We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Positioning the scrollbar in GroupingGrid control

Hi, In our application, we are using GroupingGrid control. We have around 100 records in the grid. Once we move the scrollbar to the bottom of the screen and try to edit the record at the last, scrollbar moves up & then placed in the previous position. We need to avoid the movement of scrollbar. Which property or method can be used to avoid the same? The below steps are followed while updating the grid. GroupingGrid_RecordValueChanging event is triggered and in this event we are using the following statements to avoid flickering. groupingGrid.OverlayCurrentScreenShotfalse); groupingGrid.IgnoreCurrentCellActivatedEvent = true; Then we are caching the groups which are expanded and vertical and horizontal positions of the scrollbar. Then we are updating the data in the datasource of the GroupingGrid. Then refresh the GroupingGrid.SyncfusionGridControl and then expand the grid. Now we are setting the focus to the grid and then apply the vertical and horizontal positions of the scrollbar which is cached already. Thanks & Regards, Prathima.

4 Replies

AD Administrator Syncfusion Team April 4, 2006 02:26 PM UTC

Hi Prathima, You can avoid this problem, by moving the current cell to the cached cell. Here is the code snippet. if(row != -1 && col != -1) { this.gridGroupingControl1.TableControl.CurrentCell.MoveTo(row,col,GridSetCurrentCellOptions.SetFocus); this.gridGroupingControl1.TableControl.CurrentCell.BeginEdit(); } else { this.gridGroupingControl1.TableControl.TopRowIndex = index; this.gridGroupingControl1.TableControl.LeftColIndex = indexc; } Let us know if you need any further information. Best regards, Madhan


PV Prathima Venkobachar April 6, 2006 11:30 AM UTC

Hi, When we are expanding the grid, we are adding RecordFilterDescriptor to RecordFilterDescriptorCollection. Once we add, the scrollbar flickering happens. If there is no filter, it works fine. Is there any property or method in filter to avoid this? Regards, Prathima.


PV Prathima Venkobachar April 6, 2006 11:30 AM UTC

Hi, When we are expanding the grid, we are adding RecordFilterDescriptor to RecordFilterDescriptorCollection. Once we add, the scrollbar flickering happens. If there is no filter, it works fine. Is there any property or method in filter to avoid this? Regards, Prathima.


AD Administrator Syncfusion Team April 11, 2006 02:28 PM UTC

Hi Prathima, I am really sorry for the delayed response. Try calling the this.gridGroupingControl1.TableControl.BeginUpdate(); before adding the RecordFilterDescriptor and moving the current cell to the cached cell and this.gridGroupingControl1.TableControl.EndUpdate(false); after that to see if that helps. Below is a code snippet. this.gridGroupingControl1.TableControl.BeginUpdate(); this.gridGroupingControl1.TableDescriptor.RecordFilters.Add(recordFilterDescriptor); this.gridGroupingControl1.TableControl.TopRowIndex = indexX; this.gridGroupingControl1.TableControl.LeftColIndex = indexY; this.gridGroupingControl1.TableControl.EndUpdate(false); Regards, Calvin.

Loader.
Live Chat Icon For mobile
Up arrow icon