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.

very strange effect when databinding a grid

Thread ID:

Created:

Updated:

Platform:

Replies:

54019 Dec 27,2006 11:51 AM Dec 28,2006 10:09 AM Windows Forms 4
loading
Tags: Grouping
James Blibo
Asked On December 27, 2006 11:51 AM

I have a a ggc that was working fine previously. All of a sudden, I'm getting a null reference error at the THIRD line below...

this.gridGroupingControl2.DataSource = dtSpot;
this.gridGroupingControl2.TableDescriptor.VisibleColumns.Clear();
this.gridGroupingControl2.TableDescriptor.VisibleColumns.Add("Selected");
this.gridGroupingControl2.TableDescriptor.Columns["Selected"].Appearance.AnyRecordFieldCell.CellType = "CheckBox";

BAsically, I am setting the datasource and using the visible columns property to selectively show and rearrange columns.

When I commented out all the other code besides the first line..

this.gridGroupingControl2.DataSource = dtSpot;

... all I see is the blank outline for the grid. The grid is not binding and the datasource clearly has data.

Basically nothings happens and there is no indication that something is wrong.

James Blibo
Replied On December 27, 2006 03:02 PM

This is strange... I delete the grid from the form and added it back with the same name and everything is working again.

Is there some in-memory caching that is going on that might have caused this?

Administrator [Syncfusion]
Replied On December 28, 2006 04:47 AM

Hi James,

In general, this problem occured when the datatable doesn't have the column( 'Selected' ) in the underlying datasource( 'dtSpot') of the grid. Could you please double check with your underlying datasource('dtSpot') having the 'Selected' coulmn?

Regards,
Haneef

Administrator [Syncfusion]
Replied On December 28, 2006 05:07 AM

Hi James,

In general, this problem occured when underlying datasource('dtSpot') of the grid doesn't have the column('Selected'). Could you please double check with your underlying datasource('dtSpot') ?

Regards,
Haneef

James Blibo
Replied On December 28, 2006 10:09 AM

The column "Selected" was in the datatable. That's OK, it's working now. I just found the problem weird.

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.

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.

;