Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1935
UltraGrid scroll happening when collapse/expand
posted

Hi

i have UltraGrid with 2 bands (parent /child) and i noticed that sometimes when the i expand or collapse then the vertical scrolling possition is changed. this happens when the vertical possition is not at the top 

for example 

when i expand about 4 parents to show their child band then and then scroll down and then collapse the lower parent to hide its child then the whole grid slides downwords. it complicates what i am trying to acheive - syncing two ultragrids side by side, but i am trying to take care of that, 

so i play with ActiveRowScrollRegion.ScrollPosition but the problem is that i am unable to catch the correct value of it inorder to assign it to the second grid .  and perform something like

ug2.ActiveRowScrollRegion.ScrollPosition = ug1.ActiveRowScrollRegion.ScrollPosition;

 

here is the events flow that i understand happening after collapse/expand click

1. _BeforeRowCollapsed/Expanded

2. _AfterRowCollapsed/Expanded

3. _BeforeRowRegionScroll

4. _AfterRowRegionScroll

the problem that the ug.ActiveRowScrollRegion.ScrollPosition is not changing during this flow. only sometime after the 4th event mentioned above. i know this because at the  ug_Paint event i am constatly writing the ug.ActiveRowScrollRegion.ScrollPosition and after the whole operation was completed it has different value then the value it had during all 4 events stated above.

so my assumption that there is another event after _AfterRowRegionScroll happening which during that event the ug.ActiveRowScrollRegion.ScrollPosition gets changed and at that point i need to do "my thing".

any thoughts?

Parents Reply Children
No Data