Hello!
Need your help!
I have following code:
which throws ArgumentOutOfRangeException when I try to switch in parent grid when some filter is applied to child grid (for example I selected several rows in child grid based on some condition).
I try to add
_pointGridView
.EndEdit() before
_pointGridView.DataSource = rows;
but nothing helps.
Stack trace is :
System.ArgumentOutOfRangeException was unhandled by user code
Message="Index was out of range. Must be non-negative and less than the size of the collection.\r\nParameter name: index"
Source="mscorlib"
ParamName="index"
StackTrace:
at System.Collections.CollectionBase.System.Collections.IList.get_Item(Int32 index)
at Telerik.WinControls.RadElementCollection.get_Item(Int32 index)
at Telerik.WinControls.RadElement.DisposeChildren()
at Telerik.WinControls.UI.GridTableBodyElement.CleanupRows()
at Telerik.WinControls.UI.GridTableElement.Update_Reset(GridUINotifyAction action, GridViewRowInfo[] rowInfos)
at Telerik.WinControls.UI.GridTableElement.UpdateCore(GridUINotifyAction action, GridViewRowInfo[] rowInfos)
at Telerik.WinControls.UI.GridTableElement.Update(GridUINotifyAction action, GridViewRowInfo[] rowInfos)
at Telerik.WinControls.UI.GridViewTemplate.UpdateUI(GridUINotifyAction action, GridViewRowInfo[] rowInfos)
at Telerik.WinControls.UI.GridViewTemplate.Update(GridUINotifyAction action)
at Telerik.WinControls.Data.DataAccessComponent.InitDataGrid()
at Telerik.WinControls.Data.DataAccessComponent.Bind(Object dataSource, String dataMember)
at Telerik.WinControls.Data.DataAccessComponent.set_DataSource(Object value)
at Telerik.WinControls.UI.RadGridView.set_DataSource(Object value)
at DataProviderUI.ProivderTask.ProviderTaskControl.gNSSDataProviderBindingSource_CurrentChanged(Object sender, EventArgs e) in D:\SVN\Trunk\Archivarius\src\DataProviderUI\ProivderTask\ProviderTaskControl.cs:line 164
at System.Windows.Forms.BindingSource.OnCurrentChanged(EventArgs e)
at System.Windows.Forms.BindingSource.CurrencyManager_CurrentChanged(Object sender, EventArgs e)
at System.Windows.Forms.CurrencyManager.OnCurrentChanged(EventArgs e)
InnerException:
Thanks.