Re: Row and Col property of MSHFlexGrid
- From: "Ella" <ellakayeekwan@xxxxxxxxx>
- Date: 6 Apr 2006 14:47:49 -0700
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
.
- Follow-Ups:
- Re: Row and Col property of MSHFlexGrid
- From: Ken Halter
- Re: Row and Col property of MSHFlexGrid
- From: Ella
- Re: Row and Col property of MSHFlexGrid
- References:
- Row and Col property of MSHFlexGrid
- From: Ella
- Re: Row and Col property of MSHFlexGrid
- From: Ken Halter
- Row and Col property of MSHFlexGrid
- Prev by Date: Re: Row and Col property of MSHFlexGrid
- Next by Date: RAS Active X
- Previous by thread: Re: Row and Col property of MSHFlexGrid
- Next by thread: Re: Row and Col property of MSHFlexGrid
- Index(es):
Relevant Pages
|