Re: Row and Col property of MSHFlexGrid

Tech-Archive recommends: Fix windows errors by optimizing your registry



First, thank you for your response, Ken.

However, I still can't solve my problem. I should explain more about my
applicaiton.

I have main GUI to display the grid. Only one grid will be displayed.
Either grid1 or grid2. A view menu allow users to switch to see the
other grid. By default, grid1 is displayed.

Before, I set the both grids SelectionMode to flexSelectionByRow. Now,
I changed to flexSelectionFree trying to solve the problem. I was also
using RowColChange event before. Now, I changed to use Click.

The first grid, i.e. grid1, works fine now!!!! The click event is
called even I click on the first row of grid1.
I try to print the Row, Col, MouseRow and MouseCol. They are all
correct. First row has row number 1! Everything works fine with grid1.

Then, I go to the view menu to switch to grid2. grid2 was set to
invisible at the beginning. When switching by the menu, grid2 is set to
visible and grid1 is set to invisible.

Also the content on both grid is not fixed. The grid may has nothing.
Both grids' datasource is set to different recordset.

The second grid, grid2, has many problems. Row, Col, MouseRow and
MouseCol do not match.

Let's start from the "switch". When switched to grid2, I have an empty
grid. The datasource has an empty recordset. There is combobox where
the users can select month. I switch that to another month to retrieve
data. I have a month recordset. All entries are displayed on grid2. I
click on the first row. I get Row = 1 Col = 1 MouseRow = 0 MouseCol =
5. I have only 4 column displayed. The first two columns are hided.

Where I clicked is the last cell of the first row. I will expect the
row and col be 1 and 5, same as for MouseRow and MouseCol. However,
they are not. 1 and 5 will be what I get for grid1.

Then I click on the second row. Row = 1 Col = 5 MouseRow = 1 MouseCol =
5. I expect to be 2 and 5.
Then I click on the third row. I get Row = 2 Col = 5 MouseRow = 2
MouseCol = 5. I expect to be 3 and 5.

Things are weird... If there is a vertical scroll bar, I click on it.
Then click on the grid2 again. All row column values become correct!
Like, if I click on the first row. I get Row = 1 Col = 5 MouseRow = 1
MouseCol = 5. The second row, I get Row = 2 Col = 5 MouseRow = 2
MouseCol = 5.

Of course, if the recordset is not long enough to have the scroll bar,
then the problem is always there! I have to click the second row to pop
up data of first row.

I don't know what to do now. I don't know how the VB set the row, col
or mouseRow and mouseCol properties... What can I do? Any suggestion
will be appreciated.

Thank you very much again,
Ella

.



Relevant Pages

  • Grid Column & Row values
    ... I have created a grid based on cursor say grid1. ... for slipno field in dbf). ... On the basis of slipno i get the data to be displayed in the grid1. ... But i want to display the data in the grid on the updation being done in the ...
    (microsoft.public.fox.programmer.exchange)
  • Re: Optimizing for speed
    ... > Simple query which returns ... I'd like to inmediately display records and allow user ... >> I'd consider is how much data am I loading in the grid vs. what the user ... >> in others where this isn't the bottleneck the differences aren't worth ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Label will not display NEW records frm another (bound) form.
    ... The GRID form was written in Visual Basic. ... that person’s name in a label control of a second unbound form. ... Its purpose is to display the results ... past Registrations. ...
    (microsoft.public.access.formscoding)
  • Graphics - need to draw to the screen and then erase it
    ... and then use lines to create a grid. ... I then draw sine-waves ontop of the ... So the user presses on the display with the stylus and a line is ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: Label will not display NEW records frm another (bound) form.
    ... The GRID form was written in Visual Basic. ... that person’s name in a label control of a second unbound form. ... Its purpose is to display the results ... past Registrations. ...
    (microsoft.public.access.formscoding)