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
UltraGrids - highlight same row at two grids when click
posted

hi,

I have two UltraGrids side by side, both with Parent and Child (2 hirarcial bands)

i am trying to sync both grids in the aspect of SelectedRow or ActiveRow  so when one grid will be clicked the other grid will simply highlight the same row as at the first grid - and vise versa .

if they were both with only one band then it wouldn't be a problem .

ug1.Rows[ug2l.ActiveRow.Index].Activate();  

or 

ug1.ActiveRow = ug1.Rows[ug2.ActiveRow.Index];

both are same ( I think)

but because they are both with 2 bands i can't find how to sync it at Band wise, however i was able to sync them at the Collapse/Expand events so they both expand and collapse at the same time.

and after reading in the forum i am somewhat confused by SelectedRow VS ActiveRow .

from what i found at the forum is that i should probably focuse on ActiveRow and turn SelectTypeRow  to None as  i am dealing only with one row at a time.

furthermore, i using the AfterRowActivate event  of both grids,

ug1_AfterRowActivate

ug2_AfterRowActivate

a problem that might occure is that when i am using the ug1_AfterRowActivate event to set the ug2 ActiveRow then the ug2_AfterRowActivate will fire and will try to set the ug1 ActiveRow  . like some sort of a loop. but i think i know how to resolve that , when i'll be able to resolve my first issue stated above.

Parents Reply Children
No Data