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

Essential Grid

Hi, I am binding ArrayList as a data source to the grid. After deleting row from the grid, if i select another tab and scroll on grid following error is occured. Error : An unhandled exception of type ''System.ArgumentOutOfRangeException'' occurred in mscorlib.dll Additional information: Index was out of range. Must be non-negative and less than the size of the collection.

3 Replies

AD Administrator Syncfusion Team June 2, 2006 10:28 AM UTC

Hi Shashidhara, An arbitrary ArrayList DataSource does not fire any events to notify any changes. In such cases, you would have to explicitly call grid.Refresh after the arraylist changes. Try calling this.gridDataBoundGrid1.Refresh(); after the array list changes. Regards, Calvin.


SH Shashi June 2, 2006 10:38 AM UTC

Hi, Calvin Here i am sending code. pls Check whether it is correct .. rateTablesGrid.BeginUpdate(); rateTablesGrid.Binder.SuspendBinding(); ELActions.DeleteResource(FCurrentResource); rateTablesGrid.Refresh(); rateTablesGrid.Binder.ResumeBinding(); if(rateTablesGrid.CurrentCell.RowIndex > ELActions.CurrentProject.OtherResourceList.Count) { rateTablesGrid.CurrentCell.MoveTo(1, 1); } else { rateTablesGrid.CurrentCell.MoveTo(rateTablesGrid.CurrentCell.RowIndex, 1); } rateTablesGrid.EndUpdate(true); rateTablesGrid.Refresh(); After deleting row from grid if i select another tab where iam using same list to bind grid (Filter method is used) if i scroll out of index exception throwing. Regards shashidhar D >Hi Shashidhara, > >An arbitrary ArrayList DataSource does not fire any events to notify any changes. In such cases, you would have to explicitly call grid.Refresh after the arraylist changes. Try calling this.gridDataBoundGrid1.Refresh(); after the array list changes. > >Regards, >Calvin.


AD Administrator Syncfusion Team June 2, 2006 12:58 PM UTC

Hi Shashi, Please refer to the below forum thread for more details. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=44766 Best Regards, Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon