Current filter:
                                You should refresh the page.
                                0
                                  • I have attached a quick sample of a GridControl bound to a view model in which I am trying to supply cell data via the CustomUnboundColumnData event. The bound columns collection works fine (my production code binds to nearly all fields of the GridColumn object - including the UnboundType) and the grid displayes they correct number of rows held in the RowsSource collection. I have tried adding a bound column - which displays correctly. But I simply cannot get the event to fire. Please help! I'm on a very tight schedule and need the DevExpress stuff to come to my rescue. I know it must be something stupid I'm doing - but I just cannot see it. Many thanks.

                                TestUnboundColumns.zip
                                0

                                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.

                                0

                                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

                                0

                                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

                                0

                                Hi Mark,

                                We understand that this solution is not optimal, but this seems to be the only workaround we can currently suggest.

                                In any case, our developers are currently working on this issue, and we hope it will be fixed soon. Please give us some time.

                                Thanks,
                                Vito

                                You must  log in  or  register  to leave an answer

                                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.