Can anyone tell me if it is possible to create and add data to an unbound WPF Toolkit datagrid.
If it is in fact possible to do, can someone please provide an example of the following:
Programmatically: create a datagrid create a datagridtextcolumn add the datagridtextcolumn to the datagrid create a datagridrow set the text of the datagridtextcolumn for the row to ‘test’ add the datagridrow to the datagrid
I would like to create a datagrid that is unbound. My reason is that i would like to create a template column with multiple controls of different types and numbers – 2 checkboxes, 4 radiobuttons, 5 checkboxes, etc. – which are dynamically added at runtime and since the type and number are unknown cannot think of a way to databind them. I am happy to work unbound.
Thank you in advance!
[Edit: I have not yet found an appropriate answer to this question and have started a bounty]
You can use UserControl that will create desired controls.
Window1.xaml (snippet)
Window1.xaml.cs
ControlA.xaml
ControlA.xaml.cs
Foo.cs
Hope this helps.
P.S. It should be possible to refactor DataGridTemplateColumn into separate UserControl.