Error using Sourcegrid.Datagrid when adding a row

Jan 25, 2010 at 1:35 PM
Edited Jan 25, 2010 at 3:57 PM

Hi Sourcegrid-Team

I updated to the current version of Sourcegrid and I get following error when I try to modifiy a new Row in the Sourcegrid.Datagrid:

 

Data table does not have row with given index. It has only 5 number of rows,you requested to return row number 5

Source:    bei DevAge.ComponentModel.BoundDataView.get_Item(Int32 index)
   bei SourceGrid.DataGridRows.IndexToDataSourceRow(Int32 gridRowIndex)
   bei SourceGrid.DataGridColumn.GetDataCell(Int32 gridRow)
   bei SourceGrid.DataGrid.GetCell(Int32 p_iRow, Int32 p_iCol)
   bei SourceGrid.GridVirtual.GetCell(Position p_Position)
   bei SourceGrid.GridVirtual.ArrangeLinkedControls()
   bei SourceGrid.Cells.Editors.EditorControlBase.InternalStartEdit(CellContext cellContext)
   bei SourceGrid.CellContext.StartEdit()
   bei SourceGrid.Cells.Controllers.StandardBehavior.OnFocusEntered(CellContext sender, EventArgs e)
   bei SourceGrid.Cells.Controllers.ControllerContainer.OnFocusEntered(CellContext sender, EventArgs e)
   bei SourceGrid.Selection.SelectionBase.OnCellGotFocus(ChangeActivePositionEventArgs e)
   bei SourceGrid.Selection.SelectionBase.Focus(Position pCellToActivate, Boolean pResetSelection)
   bei SourceGrid.Cells.Controllers.MouseSelection.OnMouseDown(CellContext sender, MouseEventArgs e)
   bei SourceGrid.Cells.Controllers.ControllerContainer.OnMouseDown(CellContext sender, MouseEventArgs e)
   bei SourceGrid.GridVirtual.OnMouseDown(MouseEventArgs e)
   bei System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
   bei System.Windows.Forms.Control.WndProc(Message& m)
   bei System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

 

The DataSource (datatable) has 5 rows and I bind the grid with following Source:

 

DataGrid1.DataSource = New DevAge.ComponentModel.BoundDataView(dtSettings.DefaultView)

 

With an old version of Sourcegrid everythink works fine...

What's wrong?

Best regards

Sven

Coordinator
Feb 5, 2010 at 6:19 AM

Could you post some code to reproduce this problem?