Hello,
I have a grid. Currently each band[0] has 1 record in it's band[1]. The problem i am trying to solve is if i expand the bottom record in the grid, the child row expands off screen. Is there a way bring the rows up to display the expanded rows?
Hello Jeremiah,
You can scroll to a particular row in UltraGrid by setting the FirstRow of the related RowScrollRegion to point to the row you need. For additional information you may check this article in our online documentation – “Scrolling a Row into View”.
Please let me know if any additional questions arise.
Thanks for the reply Milko,
That is very helpful. There is just one piece to the puzzle im still missing. How might i know to move the correct row up by clicking the expander? expander doesnt select the row. any thoughts?
You will need to handle AfterRowExpanded event. The event argument in this event contains a reference to the row that was expanded. You can use code like this, to scroll the row to the top:
private void UltraGrid1_AfterRowExpanded(object sender, RowEventArgs e){ this.ultraGrid1.ActiveRowScrollRegion.FirstRow = e.Row;}
Attached is a small sample showing this approach. Please check my sample and let me know if this is what you are looking for, or if you have any additional questions.