View previous topic :: View next topic |
Author |
Message |
Shailendra Baghel
Joined: 25 Nov 2005 Posts: 23
|
Posted: Fri Jan 13, 2006 10:40 am Post subject: TopRowIndex/BottomRowIndex not working |
|
|
As i understood from ur documentation
TopRowIndex is the absolute row index of the top row in the viewable space.
BottomRowIndex is the absolute row index of the bottom row in the viewable space.
I put a check in the GetCellData() event and Initially when the grid comes up i get these values as 1 and 0 respectively but i have 34 rows in the viewable space and i have only one level.
Also TopRow/BottomRow API's return the objects with values 1 and 0.
what could be wrong? |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Fri Jan 13, 2006 10:20 pm Post subject: |
|
|
My guess is that you are checking the value of BottomRowIndex before it has actually been set. The value of BottomRowIndex depends on the heights of the rows displayed which is not known until all the calls to GetRowData and GetCellData have completed. _________________ Infralution Support |
|
Back to top |
|
|
Shailendra Baghel
Joined: 25 Nov 2005 Posts: 23
|
Posted: Tue Jan 17, 2006 1:02 pm Post subject: |
|
|
Thanks. yes you are correct.
In GetCellData() values of TopRowIndex and BottomRowIndex are meaningless.
The GetCellData() event fetches data for rows which are in the viewable space starting from top visible row till the bottom visible row.
Now i want an event which tells that GetCellData() event has done its job and all data for rows in viewable space has been shown.
If it is not an event, through which property or method of virtual tree class can i know the above.
Basically i am talking of Post GetCellData() event. |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Tue Jan 17, 2006 10:24 pm Post subject: |
|
|
You could override the OnLayout method (and call the base OnLayout method). All the calls to GetRowData and GetCellData happen from within the OnLayout method.
Currently VirtualTree does not fire the Layout event so you would have to override the OnLayout method. If you really need an event rather than overriding a method in a derived class we could change this in the next release. _________________ Infralution Support |
|
Back to top |
|
|
|