Checbox in GridViewDataColumn

2 posts, 0 answers
  1. crazy05
    crazy05 avatar
    72 posts
    Member since:
    Sep 2014

    Posted 26 May 2015 Link to this post

    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>

     

  2. Stefan X1
    Admin
    Stefan X1 avatar
    523 posts

    Posted 29 May 2015 Link to this post

    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
  3. DevCraft banner
Back to Top