Click here to Skip to main content
15,891,431 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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...

Thanks and Regards
PMM :)
Posted

1 solution

You need to use DataTriggers in CellEditorTemplate
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900