Edit checkbox column

6 posts, 1 answers
  1. Richard Koslik
    Richard Koslik avatar
    71 posts
    Member since:
    Apr 2010

    Posted 01 Feb 2011 Link to this post

    Hello!

    I have now implemented a RadGridView with two columns, one checkbox and one textfield. The checkbox is editable and the textfield not. My question now: Is it normal that I have to click three times into the checkbox column for editing the checkbox. I also tried it at your Silverlight tutorial and it works the same! Why? The grid in the Ajax Tutorials works, why not in Silverlight?

    - 1st click: column is selected
    - 2nd click: column is in edit mode
    - 3rd click: value of column is changed

    Best regards, Richard Koslik
  2. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 01 Feb 2011 Link to this post

    Hi,

    Have you tried to set EditTriggers to "CellClick"?

    Greetings,
    Vlad
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  3. DevCraft banner
  4. Answer
    Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 01 Feb 2011 Link to this post

    Hi Richard Koslik,

    Setting the EditTriggers to CellClick will reduce the number of clicks to two - one for entering edit mode and one to change the value of the checkbox.
    If you need to change the value with one click as a whole, you need to set AutoSelectOnEdit="True" as well.
    So, here is the final definition:

    <telerik:GridViewCheckBoxColumn DataMemberBinding="{Binding IsActive}"
                     AutoSelectOnEdit="True"
                     EditTriggers="CellClick" />



    All the best,
    Veselin Vasilev
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  5. Richard Koslik
    Richard Koslik avatar
    71 posts
    Member since:
    Apr 2010

    Posted 01 Feb 2011 Link to this post

    Hello!

    Thanks for your fast answers, it works now!

    Regards, Richard Koslik
  6. or hor
    or hor avatar
    1 posts
    Member since:
    Mar 2011

    Posted 07 Mar 2011 Link to this post

    yes, and what to do in the case the columns are generated automatically?

    thank you in advance

  7. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 07 Mar 2011 Link to this post

    Hello Richard Koslik,

    You may try to handle the AutoGeneratingColumn event of the grid and set the EditTriggers property for the column you want.
     

    Best wishes,
    Maya
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Back to Top
DevCraft banner