Winform DataGridView to UWP Datagrid C#

I was looking to transition from Winforms to UWP. In my first prjoct I need to build a table of data which is dynamic in nature. I have accomplished this with a DataGridView in WinForms very easily by adding columns dynamically and formating the cells according to the cell value.

  AREA1 | CAR10 | CAR 7 | CAR3 |  |
+=======+=======+=======+======+==+
| AREA2 |       |       |      |  |
+-------+-------+-------+------+--+
| AREA3 | CAR5  | CAR1  |      |  |
+-------+-------+-------+------+--+
| AREA4 |       |       |      |  |
+-------+-------+-------+------+--+
| AREA5 | CAR4  |       |      |  |
+-------+-------+-------+------+--+
| AREA6 |       |       |      |  |
+-------+-------+-------+------+--+
| AREA7 | CAR21 | CAR45 |      |  |
+-------+-------+-------+------+--+
| AREA8 |       |       |      |  |
+-------+-------+-------+------+--+
|       |       |       |etc..      |  |
+-------+-------+-------+--

It's very inportant to be able to format the cells accoring to the underly objects properties. I have been looking at a couple of datagrid controls mainly the Telerik UI for UWP Datagrid but I can not see how you dynamically create the properties and then format the cells. I think it would be easy if it was possible to format the grid in the Code behind of the Xaml but this seems the incorrect way?

1 answer

  • answered 2018-09-17 06:19 touseefbsb

    DataGrid control by UWP Community Toolkit is the standard and recommended way to do Enterprise and LOB apps specially when you need a table like data structure, it has everything you need, from cell editing, to virtualization to editing every cell by UI or by backend.