Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
150
Column headers for dynamic data?
posted

My setup: I'm loading data into a DataTable at server-side. In my app I'm binding the DataTable to a UltraGridDatasource where I've defined some of the columns that are in the DataTable. The rest of the columns are dynamic in the DataTable and the amount varies depending on the data. The UltraGridDatasource is then bound to an UltraGrid.

My problem: When I bind the UltraDataSource to the grid the column caption is the same as the key in the DataTable, even though I've set a different caption for the columns I've defined in the UltraGridDatasource. It seems that the UltraGridDatasource overrides settings and uses the DataTable keys as captions for all columns when the DataTable includes dynamic (undefined) data columns.

My question: How can I mix data so that the column captions, for defined columns in the UltraGridDatasource, are based on defined values and dynamic columns use the DataTable column / UltraGridDatasource column key as the caption?