Tech
Forums
Jobs
Books
Events
Videos
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
1
Answer
Checkbox in WPF
sreekanth v
13y
2.7k
1
Reply
I have a datagrid i have a column isworking. i want to place checkbox in datagrid template. I placed it but its not working. dynamically when i check or uncheck checkbox in datagrid template that row should be hide. where i should write the code what event i have to use. please help me
thank you.
here code.
Collapse
|
Copy Code
<DataGrid AutoGenerateColumns="False" Name="gv"> <DataGrid.Columns> <DataGridTextColumn Binding="{Binding Path=Empid}" Header="empid"/> <DataGridTextColumn Binding="{Binding Path=empname}" Header="ename"/> <DataGridTextColumn Binding="{Binding Path=deptid}" Header="Age"/> <DataGridTextColumn Binding="{Binding Path=salary}" Header="Employee Number"/> <DataGridTextColumn Binding="{Binding Path=joiningdate}" Header="JoiningDate"/> <DataGridTemplateColumn Header="Isworking"> <DataGridTemplateColumn.CellTemplate> <DataTemplate> <CheckBox Name="chk" Content="{Binding Path=isworking}" IsChecked="False" IsThreeState="False"/> </DataTemplate> </DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn> </DataGrid.Columns> </DataGrid>
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
Can we use Ribbon in complex project?
Attendance System