Click here to Skip to main content
14,691,972 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:

I have a datagrid having two columns, a CheckBox template column and textcolumn. if i checked the checkbox then i want to show TRUE in the datacolumn and otherwise have to show FALSE. is there any way..can anybody helpme

Kenneth Haugland 8-Aug-12 0:36am
Use an IValueConverter and bind the combobox to the textbox routed via the Converter
Kunjammu 8-Aug-12 1:31am
i did like below. but not working. can you please tell whats wrong<datagridtemplatecolumn width="10"> <datagridtemplatecolumn.celltemplate> <datatemplate><checkbox name="select"> <datagridtextcolumn width="100" binding="{Binding Path=IsChecked, ElementName=select, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource persondata}}">
Kunjammu 8-Aug-12 3:11am
Hi Kenneth Haugland
i got the result..Thanks...
Kenneth Haugland 8-Aug-12 3:55am
Your welcome :)
What is "check box selected value"? If it was a list box, I would understand, but check box does not have "selection" (not to be mixed with focus).

1 solution

Please do yourself a favor and don't do it. This is unwanted redundancy (check box already represents true/false value) will only confuse the user. This would be a violation of the Single Source of Truth principle:[^].


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