Diiferent Editing Controls in one column in WPF DataGrid

Posted by Peermohamedmydeen under WPF on 11/29/2010 | Points: 10 | Views : 2524 | Status : [Member] | Replies : 1
Hi All,

I have a datatable like follows. Items and DataType are two columns.

Items| DataType | Value
-----------------------------------
A I 5
B S Test
C S WPF Grid
D B true
E I 2451
F B false


I want to bind the DataTable to a WPF DataGrid. I want to have different editing controls on a Value column based on the DataType Column.

If I edit first and second row row, it has to be the text column, where as If I edit 4 & 6 row ... it has to be the combobox column with true/false are the items of the combobox...

Any suggestions much appreciated...




Responses

Posted by: Karthikanbarasan on: 1/5/2011 [Member] [Moderator] [Microsoft_MVP] [MVP] Silver | Points: 25

Up
0
Down
Hi,

Below article shows how to use combo box with the datagrid, you can customize it based on the need.

http://www.c-sharpcorner.com/UploadFile/dpatra/413/Default.aspx

Thanks
Karthik
www.f5Debug.net

Peermohamedmydeen, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response