When rows are selected in the grid that has scroll bars (vertical or horizontal), they will lose focus when scroll bar is clicked to move.
How do I keep the rows stay selected when I am done with ,or while, scrolling?
Hello Juliep,
This is the Windows Forms forum and control that being discussed here is the UltraGrid control.
If you have a similar requirement for WebGrid control in ASP.NET please post your question here:http://community.infragistics.com/forums/61.aspx
or if it is about WebDataGrid:http://community.infragistics.com/forums/196.aspxIf you have any other questions please do not hesitate to contact us.
My rows are deselected after scrolling I don't want this plz tell me how to do it in javascript
You can use UIElements for this.
private void ultraGrid1_MouseClick(object sender, MouseEventArgs e) { UltraGrid grid = (UltraGrid)sender; UIElement element = grid.DisplayLayout.UIElement.LastElementEntered; if (element is ScrollBarUIElement) return; element = element.GetAncestor(typeof(ScrollBarUIElement)); if (element != null) return; }
My mistake. I have some code to de-select rows in handling mouse click event.
So now the question is how do I detect that this mouse click is triggered by clicking Scroll bar, so I can ignore it so no de-select happening and the rows will stay selected. How to detect clicking on scroll bar?