Current filter:
                                You should refresh the page.
                                  • Hi,

                                    I have a datagrid where I created the columns in the designer. Later I would like to make further settings here.
                                    For example header icon, summary line and some more, because the designer is a great tool.

                                    At runtime I want to fill the Datagrid with the data. The source of the data is a ConcurrentDictionary(string, data class) which I first write into a data table and then into a DataSet which is then the data source of the data for the Datagrid.

                                    Enclosed you can find my example.
                                    With PopulateColumns() I can see the data but unfortunately the columns from the data table and not the columns from the designer
                                    If I leave gridView.PopulateColumns() gone, the desired columns from the designer are there but I don't see any data.

                                    How do I customize my code so that the columns are used by the designer and all other things by the designer and only the data is loaded into the datagrid at runtime?

                                    Many thanks in advance.

                                1 Solution

                                Creation Date Importance Sort by

                                I did it myself. Yippi.

                                The trick is to set the property "FieldName" in the designer to the same name as the column in the data table.

                                Then the columns from the designer are used and not those from the data table.

                                I have adapted the project and made it available for all those who stumble across the same problem.

                                If you know how to do it, it's easy :-)


                                • Maxim L (DevExpress Support) 01.14.2019

                                  Hi Sven,
                                  Yes, you are right, the grid column FieldName property and the data table column Name property should have the same value.
                                  I'm happy to hear that you've found a solution yourself. And thank you for sharing your sample with us. I believe it will help other users.
                                  Should you have any further questions, feel free to contact us.