I am having some 7-8 columns in UltrawinGrid bound to DataSource at runtime and now I want to add few more column of type button/checkbox/combobox at design time. As I am able to add these columns to ultrawingrid but at runtime these newly added column are not appearing, i.e. i am only able to 8 column that are bound to dataasource at runtime but no manually added column is appearing.
The only reason that I can think of is that the source you are binding the grid to does not have the same key as the band of the grid you created at design time, so the grid will recreate its layout. For example, if you have a DataTable with a name of "My Table", try setting DisplayLayout.Bands[0].Key = "My Table" at design time.
-Matt
Thanks for the reply Matt !
But as we know in general.net DataGridView if we have situation like this, then runtime will diaplay Keys coming from DataSource + the keys which are not coming from datasource like button/some blank column... So I was looking for the same behaviour from UltraWinGrid if poosible i.e. it must show the keys coming from DataSource + Keys which are part of desgin time schema(assume button) but not coming from DataSource...
--sumit
You might want to check out this KB article, as well.
HOWTO:How can I define columns in the grid at Design-time and bind them at run-time so that some fields of the data are excluded from the grid?
Well my point here is that the name of the schema and band that you've created at design-time doesn't match the name of the band that you bind to at run-time, so the grid detects that this is completely new and should discard its original state; at least I think this is what is going on, I am speculating here. You could also create all of these columns in run-time using the InitializeLayout event, but it would be easier to set the key of the band instead.