This seems like a fairly basic feature but either it’s not supported or I just can’t get it to work. How about allowing us to add bound columns to the grid via the designer. Then when we set the datasource dynamically, it will match the field names up correctly instead of throwing an exception saying that there is a duplicate unbound data field. This I expect would be one of the most common use of the Grid.
Imported from legacy forums. Posted by bdang (had 3613 views)
Hi bdang , The grid won’t allow you to design unbound grids and later bind to a datasource with matching field names. This is required to differentiate bound from unbound columns at runtime or design time. Also, one cannot currently define bound columns without a binding, since the binding data structure need to be inspected during design time.
The following idea could help you design bound grids that will be bound dynamically later.
1) Bind a grid to what I call a “draft data source” during design time. That draft data source is a light replication of your real target datasource in its data structure ( field names and types ). 2) Then during form loading, bind the grid to the real datasource. The grid associates the columns that have matching field names and types to be used.
This assumes you know the field types and names of your data. Also, if the real data changes ( i.e.: instance columns are added or deleted to a table) you need to handle these changes. In one of my projects, this helped me start early on the UI, without having the final dataset in hand. Hope that can help!
Imported from legacy forums. Posted by Vince [Xceed] (had 327 views)