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.

Exception quering CellType of GridBoundColumn

Thread ID:

Created:

Updated:

Platform:

Replies:

7637 Oct 3,2003 12:06 PM Oct 3,2003 02:04 PM Windows Forms 3
loading
Tags: GridControl
Gene Gorokhovsky
Asked On October 3, 2003 12:06 PM

I have a fairly complex class hierarchy preparing column styles for my grid, and essentially end-up doing following (across multiple classes) //parent class prepares an array of gridcolumns GridBoundColumn gbc = new GridBoundColumn(); gbc.CellType = "ComboBox"; .... //a child class wants to make this column read-only if (gbc.CellType != "CheckBox") { gbc.CellType = "Static"; //and other style changes } This all happens before gbc ever gets assigned to any grid. Unfortunately reading CellType (inside that if statement) results in an exception, apparently trying to inherit style settings from a non-existent model. Could this behavior perhaps be changed so when no model is yet know, style just returns its own value? Gene Gorokhovsky GridDataBoundGrid 1.6.1.6

Administrator [Syncfusion]
Replied On October 3, 2003 01:39 PM

I will look into this. That's how it should normally be implemented that it won't try to locate a model if the style is not assigned to a model yet. You say that happens with any GridBoundColumn as long as it is not assigned to a GridBoundColumns Collection. Correct? If that is the issue a workaround in the meantime would be to check style.HasCellType before accessing style.CellType. Stefan

Gene Gorokhovsky
Replied On October 3, 2003 01:46 PM

>You say that happens with any GridBoundColumn as long as it is not assigned to a GridBoundColumns Collection. Correct? > Yes. The suggested workaround does not help -- HasCellType returns true, and the damn thing still bombs.

Administrator [Syncfusion]
Replied On October 3, 2003 02:04 PM

Ok, just tell me how to modify one of our samples to reproduce the problem. This helps me be sure I didn't misunderstand your setup. Stefan

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.

;