I want to use xamDataGrid whose itemsource is datatable, but instead of displaying default columns of datatable inside xamDataGrid, I want to customise them before displaying in xamDataGrid. For example for first column of datatable i want to use textbox, but for the rest of datatable's columns I want to use comboboxes. I don't want to hard code fields inside xaml because in my scenario no of fields (columns) may vary each time, so i don't have information about them at design time. I also want proper binding of fields as well so that i could save changes back to datatable. If anybody could help me with example ?
Hello,
If you want to add fields and specify their editors via codebehind, that is fine. Here are some help articles that give you all the information that you need. Both these articles have the appropriate code behind code to use.
This article will help you with adding fields dynamically to the grid and its field layout. http://help.infragistics.com/NetAdvantage/WPF/2010.3/CLR4.0?page=xamDataPresenter_Define_a_Field_Layout.html
This article shows you how to change the editor of a field to be the XamComboEditor. In the article, it shows unbound fields, you can use regular field object instead. http://help.infragistics.com/NetAdvantage/WPF/2010.3/CLR4.0?page=xamComboEditor_Setting_the_xamComboEditor_as_an_Editor_of_a_Field_Programmatically.html
Hope this helps and is enough information. If you still need a sample, let me know and I will put something together.