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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Datagrid Cell coloring

Thread ID:

Created:

Updated:

Platform:

Replies:

8000 Oct 16,2003 12:49 PM UTC Feb 17,2004 07:27 PM UTC Windows Forms 1
loading
Tags: FAQ
Ken
Asked On October 16, 2003 12:49 PM UTC

I am getting the following exception trace when using the datagrid coloumn color method (2)you've described. I must obviously be doing something wrong here and was looking for any ideas: Description: Datagrid is bound. I select on a sorted column and change the sorting by double clicking the column. Then app ( after user selects different data) re-populates the dataset and exact table_name with a new table ( which is empty ). At this point the following exception is thrown. Any help would be appreciated. Thanks, Ken ************** Exception Text ************** System.IndexOutOfRangeException: Cannot find column 3. at System.Data.DataColumnCollection.get_Item(Int32 index) at System.Data.DataView.System.ComponentModel.IBindingList.get_SortProperty() at System.Windows.Forms.CurrencyManager.GetSortProperty() at System.Windows.Forms.DataGrid.PaintColumnHeaderText(Graphics g, Rectangle boundingRect) at System.Windows.Forms.DataGrid.PaintColumnHeaders(Graphics g) 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) at System.Windows.Forms.Control.WmPaint(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Administrator [Syncfusion]
Replied On February 17, 2004 07:27 PM UTC

> I am getting the following exception trace when using the datagrid coloumn color method (2)you've described. I must obviously be doing something wrong here and was looking for any ideas: > > Description: > Datagrid is bound. I select on a sorted column and change the sorting by double clicking the column. > Then app ( after user selects different data) re-populates the dataset and exact table_name with a new table ( which is empty ). At this point the following exception is thrown. > > Any help would be appreciated. > Thanks, > Ken > > > > ************** Exception Text ************** > System.IndexOutOfRangeException: Cannot find column 3. > at System.Data.DataColumnCollection.get_Item(Int32 index) > at System.Data.DataView.System.ComponentModel.IBindingList.get_SortProperty() > at System.Windows.Forms.CurrencyManager.GetSortProperty() > at System.Windows.Forms.DataGrid.PaintColumnHeaderText(Graphics g, Rectangle boundingRect) > at System.Windows.Forms.DataGrid.PaintColumnHeaders(Graphics g) > 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) > at System.Windows.Forms.Control.WmPaint(Message& m) > at System.Windows.Forms.Control.WndProc(Message& m) > at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m) > at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m) > at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) >

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;