Hi all
First things first, I do not use multithreading to update any control, all re-marshalled onto the UI-thread. I do not rebind the control, I add/remove rows in the underlying tables, all on the UI-thread. The SqlConnection is not shared and it is contained in a "using" block (so hopefully isolated)
I have a Winform smartclient, a datagrid bound to a dataset with 2 data tables, one relation (AKA kind of drill down). I get exceptions below, regularly but not reproducible.
x) The column name in the exception can change between the exceptions.
x) It did not blow up at start but while it had been running, the code works fine so no errors in sql
x) I do not rename the column names nor alter the dataset schema
x) the call stack shows DataGridRelationshipRow, I assume this is because it is displaying a relation between 2 tables?
x) I cannot get the error on my machine but a colleagues does, different video cards (maybe faster redraw, worst redraw breakages?)
x) The WinForm has 2 datagrids being updated simultaneously, any pollution on result sets? any static variable contamination on grid?
any help appriciated
Martin
Column 'Status' does not belong to table ValuationBatch.
Source: System.Data.DataRow
Exception: System.ArgumentException
Process:
Stack Trace:
at System.Data.DataRow.GetColumnError(String columnName)
at System.Data.DataRowView.System.ComponentModel.IDataErrorInfo.get_Item(String colName)
at System.Windows.Forms.DataGridRelationshipRow.PaintCellContents(Graphics g, Rectangle cellBounds, DataGridColumnStyle column, Brush backBr, Brush foreBrush, Boolean alignToRight)
at System.Windows.Forms.DataGridRow.PaintData(Graphics g, Rectangle bounds, Int32 firstVisibleColumn, Int32 columnCount, Boolean alignToRight)
at System.Windows.Forms.DataGridRelationshipRow.Paint(Graphics g, Rectangle bounds, Rectangle trueRowBounds, Int32 firstVisibleColumn, Int32 numVisibleColumns, Boolean alignToRight)
at System.Windows.Forms.DataGrid.PaintRows(Graphics g, Rectangle& boundingRect)
at System.Windows.Forms.DataGrid.PaintGrid(Graphics g, Rectangle gridBounds)
at System.Windows.Forms.DataGrid.OnPaint(PaintEventArgs pe)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
Column 'Requester' does not belong to table ValuationItem.
Source: System.Data.DataRow
Exception: System.ArgumentException
Process:
Stack Trace:
at System.Data.DataRow.CheckColumn(DataColumn column)
at System.Data.DataRowView.GetColumnValue(DataColumn column)
at System.Data.DataColumnPropertyDescriptor.GetValue(Object component)
at System.Windows.Forms.DataGridColumnStyle.GetColumnValueAtRow(CurrencyManager source, Int32 rowNum)
at System.Windows.Forms.DataGridTextBoxColumn.Paint(Graphics g, Rectangle bounds, CurrencyManager source, Int32 rowNum, Brush backBrush, Brush foreBrush, Boolean alignToRight)
at System.Windows.Forms.DataGridRelationshipRow.PaintCellContents(Graphics g, Rectangle cellBounds, DataGridColumnStyle column, Brush backBr, Brush foreBrush, Boolean alignToRight)
at System.Windows.Forms.DataGridRow.PaintData(Graphics g, Rectangle bounds, Int32 firstVisibleColumn, Int32 columnCount, Boolean alignToRight)
at System.Windows.Forms.DataGridRelationshipRow.Paint(Graphics g, Rectangle bounds, Rectangle trueRowBounds, Int32 firstVisibleColumn, Int32 numVisibleColumns, Boolean alignToRight)
at System.Windows.Forms.DataGrid.PaintRows(Graphics g, Rectangle& boundingRect)
at System.Windows.Forms.DataGrid.PaintGrid(Graphics g, Rectangle gridBounds)
at System.Windows.Forms.DataGrid.OnPaint(PaintEventArgs pe)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
WQAndre - 06 Apr 2007 22:10 GMT
Hi Goldii,
I do have the same problems like you.
Did you find out something yet?
All hints are welcome
Andre
> Hi all
>
[quoted text clipped - 47 lines]
> ---
> Posted via DotNetSlackers.com
WQAndre - 10 Apr 2007 21:00 GMT
Hi,
I think I did find the problem.
I now make sure that a BindingSource used for a pickList in a combobox
column is assigned to before the BindingSource is assigned that has the
column in it.
Andre
> Hi Goldii,
> I do have the same problems like you.
[quoted text clipped - 53 lines]
> > ---
> > Posted via DotNetSlackers.com