This is a migrated thread and some comments may be shown as answers.

Checbox in GridViewDataColumn

1 Answer 32 Views
GridView
This is a migrated thread and some comments may be shown as answers.
crazy05
Top achievements
Rank 1
crazy05 asked on 26 May 2015, 02:58 PM

Hello,

I have the below code which is Checkbox in GridViewDataColumn. When user check or uncheck the Checkbox, I want to Interact with the code and change few properties. How Can I interact with Code on checkbox check or uncheck ? The event trigger is not working. Is this the right way to do ?

 

<telerik:GridViewDataColumn Name="GridDiagramDelete" Header="Delete" Width="60">
<telerik:GridViewDataColumn.CellTemplate>
<DataTemplate>
<CheckBox HorizontalAlignment="Center" IsChecked="{Binding IsDeleted, Mode=TwoWay}" >
<i:EventTrigger EventName="Checked">
<cmd:EventToCommand Command="{Binding IsDiagramDeleted, Mode=TwoWay }"></cmd:EventToCommand>
</i:EventTrigger>
</CheckBox>
</DataTemplate>
</telerik:GridViewDataColumn.CellTemplate>
</telerik:GridViewDataColumn>

 

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 29 May 2015, 07:26 AM
Hello Ram,

For this scenario, you can handle the Checked/Unchecked events of the CheckBox, or you can implement some logic based on the the property to which the IsChecked property of the CheckBox is bound to. Choosing the approach depends on what logic you need to implement when CheckBox is checked/unchecked. Can you please shed more light on that?

Best Regards,
Stefan
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
GridView
Asked by
crazy05
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or