Administrator [Syncfusion]
Asked On November 11, 2003 10:47 PM UTC
Hi,
I am using 1.6.1.8 Data bound grid. When I try to copy/paste rows into my grid, it throws some exception from grid base classes.
You can reproduce this error in the FilterBarGrid sample.
1. Run 2 instances of the sample.
2. Highlight 3 or 4 rows (or some area with 3 cols/4 rows) and click Ctrl-C
3. Goto the second instance (which is executing from VS.NET, click in the last row (add new row) and hit Ctrl-V.
4. Notice the following exception in the output window.
Can you please look into this.
Thanks,
- Reddy
Additional information: Object reference not set to an instance of an object.
Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.System.IndexOutOfRangeException: Index 91 is not non-negative and below total rows count.
at System.Data.DataView.GetElement(Int32 index)
at System.Data.DataView.System.Collections.IList.get_Item(Int32 recordIndex)
at Syncfusion.Windows.Forms.Grid.GridModelDataBinder.SaveCellInfo(GridSaveCellInfoEventArgs e)
at Syncfusion.Windows.Forms.Grid.GridModelDataBinder.Syncfusion.Windows.Forms.Grid.IGridModelDataProvider.SaveCellInfo(GridSaveCellInfoEventArgs e)
at Syncfusion.Windows.Forms.Grid.GridModel.SetCellInfo(Int32 rowIndex, Int32 colIndex, GridStyleInfo style, StyleModifyType modifyType, Boolean dontRaiseSaveCellInfoEvent, Boolean copyReferenceOnly)
at Syncfusion.Windows.Forms.Grid.GridModel.SetCellInfo(Int32 rowIndex, Int32 colIndex, GridStyleInfo style, StyleModifyType modifyType)
at Syncfusion.Windows.Forms.Grid.GridModel.ChangeCells(GridRangeInfo range, GridStyleInfo[] cellsInfo, StyleModifyType modifyType)
at Syncfusion.Windows.Forms.Grid.GridModel.Syncfusion.Windows.Forms.Grid.IGridVolatileDataContainer.ChangeCell(Int32 rowIndex, Int32 colIndex, GridStyleInfo style)
at Syncfusion.Windows.Forms.Grid.GridVolatileData.set_Item(Int32 rowIndex, Int32 colIndex, GridStyleInfo value)
at Syncfusion.Windows.Forms.Grid.GridStyleInfoIdentity.OnStyleChanged(StyleInfoBase style, StyleInfoProperty sip)
at Syncfusion.Styles.StyleInfoBase.OnStyleChanged(StyleInfoProperty sip)
at Syncfusion.Windows.Forms.Grid.GridStyleInfo.OnStyleChanged(StyleInfoProperty sip)
at Syncfusion.Styles.StyleInfoBase.SetValue(StyleInfoProperty sip, Object value)
at Syncfusion.Windows.Forms.Grid.GridStyleInfo.set_CellValue(Object value)
at Syncfusion.Windows.Forms.Grid.GridCellModelBase.ApplyFormattedText(GridStyleInfo style, String text, Int32 textInfo)
at Syncfusion.Windows.Forms.Grid.GridStyleInfo.ApplyFormattedText(String text, Int32 textInfo)
at Syncfusion.Windows.Forms.Grid.GridModelTextDataExchange.PasteTextRowCol(Int32 rowIndex, Int32 colIndex, String text)
at Syncfusion.Windows.Forms.Grid.GridModelDataBinder.DataBoundPaste(IDataObject iData, Int32 clipboardFlags, GridRangeInfoList rangeList, GridCutPasteEventArgs e)
at Syncfusion.Windows.Forms.Grid.GridDataBoundGridModel.OnClipboardPaste(GridCutPasteEventArgs e)
at Syncfusion.Windows.Forms.Grid.GridModelCutPaste.Paste()
at Syncfusion.Windows.Forms.Grid.GridControlBase.OnKeyDown(KeyEventArgs e)
at Syncfusion.Windows.Forms.Grid.GridDataBoundGrid.OnKeyDown(KeyEventArgs e)
at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)
at Syncfusion.Windows.Forms.Grid.GridControlBase.ProcessKeyEventArgs(Message& m)
at Syncfusion.Windows.Forms.Grid.GridControlBase.ProcessKeyPreview(Message& m)
at System.Windows.Forms.Control.ProcessKeyMessage(Message& m)
at Syncfusion.Windows.Forms.Grid.GridTextBoxControl.ProcessKeyMessage(Message& m)
at System.Windows.Forms.Control.WmKeyChar(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.TextBoxBase.WndProc(Message& m)
at System.Windows.Forms.RichTextBox.WndProc(Message& m)
at Syncfusion.Windows.Forms.Grid.GridTextBoxControl.WndProc(Message& msg)
catched at Syncfusion.Windows.Forms.Grid.GridTextBoxControl.WndProc(Message& msg) in :line 0