I have succeeded in get the event to fire by adding the columns 'manually' in code rather than as part of an ObservableCollection with bindings to the column properties via a DataTemplate. I will use this as a workaround - but it does rather reduce even further the effectiveness of the MVVM separation. If it is not a bug but me being silly, please let me know. Many thanks again.
Hi Mark,
Thank you for your sample. We have reproduced the issue, and will try to fix it in future releases.
To work around it, bind the UnboundType property.
For example:
[XAML]<dxg:GridColumn FieldName="{Binding ColumnID}" Header="{Binding ColumnHeader}" Tag="{Binding ColumnIndex}" UnboundType="{Binding UnboundType}"/>
[C#]public class ColumnDef { public string ColumnID { get; set; } public string Header { get; set; } public int ColumnIndex { get; set; } public DevExpress.Data.UnboundColumnType UnboundType { get; set; } } //.... new ColumnDef { ColumnID = "Column1", Header = "Column1", ColumnIndex = 0, UnboundType = DevExpress.Data.UnboundColumnType.Integer, }
Thanks,
Andrew
Thanks Andrew. Prompt service as ever.
Unfortunately, I will have to stick to my current workaround as the ColumnDef objects in my quick example are, in fact, database column objects buried in a view-agnostic assembly referenced by the DevEx front-end and thus they cannot (and should not) reference the DevExpress.Data classes.
Ah, well - we'll survive somehow! :)
Thanks again, M
Is your intention to post an answer to your own question?
- If so, then proceed.
- If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
- If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.
Facebook
Twitter
Google+