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

An unhandled exception of type ''System.ArgumentOutOfRangeException'' occurred in syncfusion.grouping.dll

i am receiving this error: An unhandled exception of type ''System.ArgumentOutOfRangeException'' occurred in syncfusion.grouping.dll Additional information: Specified argument was out of the range of valid values. whenever i re-assign the datasource of a gridgroupcontrol and using the arrow keys to navigate the gridgroupcontrol. i believe the error is caused primary because when i reassign the datasource, the records is now fewer than the previous assignment, thus the error. any idea how do i resolve this? thanks.

6 Replies

AD Administrator Syncfusion Team October 10, 2004 02:45 PM UTC

I tried to reproduce this in 2.1.0.9 by just changing out a datatable datasource with a new table with fewer rows and columns, but could not get the exception. Maybe I am not following the steps that you are doing. Can you see the problem in this sample. GGCresetData_1551.zip After changing the datasource, you can try setting the CurrentRecord to one in the new table with code like beow to see if that will avoid this problem.
if(this.gridGroupingControl1.Table.FilteredRecords.Count > 0)
				this.gridGroupingControl1.Table.CurrentRecord = this.gridGroupingControl1.Table.FilteredRecords[0] as GridRecord;


AD Administrator Syncfusion Team October 10, 2004 10:16 PM UTC

yes. i am able to reproduce the error. this is how i do it: 1. i hit the down arrow keys 12 times. 2. i click on the button 3. i click on the white area in the gridgrouping control. 4. i hit up arrow once. after going through the above steps, i will get the error.


AD Administrator Syncfusion Team October 11, 2004 07:38 AM UTC

I can see the problem. I will forward this to the development team to see how they want to handle this. The little code snippet above seemed to avoid the problem for me in the sample. Will it work for you until this is a build availble that addresses this issue?


AD Administrator Syncfusion Team October 11, 2004 10:57 AM UTC

the snippet does work when the datasource contain at least 1 record. however, it fails when i re-assign a datasource of 0 records.


AD Administrator Syncfusion Team October 11, 2004 11:31 AM UTC

Try this instead after setting the datasource. this.gridGroupingControl1.TableControl.CurrentCell.SetPositionNoActivate(0, 0);


AD Administrator Syncfusion Team October 12, 2004 09:54 AM UTC

yes. this snippet fixed the problem. hopefully this issue will be fixed in the next syncfusion release. thanks and cheers.

Loader.
Live Chat Icon For mobile
Up arrow icon