Update GridView

5 posts, 0 answers
  1. Rene
    Rene avatar
    11 posts
    Member since:
    Feb 2014

    Posted 03 Feb Link to this post

    Hi,

     

    i use c#/wpf RadGridView. I bound i Collection calls to my RadGridView. Here i have a RadGridViewDataColumn with a cell template checkbox.
    My problem ist that i have perhaps 10 items in my collection with the same telephone-no. if i check one of these items i want to check the rest of
    the items in my collection with the same no. too. Also if i uncheck one, i want to uncheck the rest to. How can i do this?

     

    Thanks

    Rene

  2. Rene
    Rene avatar
    11 posts
    Member since:
    Feb 2014

    Posted 03 Feb in reply to Rene Link to this post

    second problem in this case. I hace to select the row first. Is it possible to the the row without selecting it first?
  3. Stefan Nenchev
    Admin
    Stefan Nenchev avatar
    413 posts

    Posted 08 Feb Link to this post

    Hi Rene,

    You can attach to the Checked/Unchecked events of the CheckBox and in the event handlers iterate over the items of the RadGridView and manually check/uncheck the similar items. I have attached a sample for your reference.

    Regards,
    Stefan Nenchev
    Telerik by Progress
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
  4. Rene
    Rene avatar
    11 posts
    Member since:
    Feb 2014

    Posted 10 Feb in reply to Stefan Nenchev Link to this post

    Thanks Stefan,

    that's it! This was very helpfull. But know if add a new item during runtime, the RadGridView is not updated. I have to restart
    the application and than i see my new entry. I tried to rebind the Grid, but without success.

    Thanks
    Best Regrads
    Rene

  5. Stefan Nenchev
    Admin
    Stefan Nenchev avatar
    413 posts

    Posted 14 Feb Link to this post

    Hi Rene,

    It seems that the RadGridView is not notified that a new item is added to your source collection. You can consider using an ObservableCollection.

    Regards,
    Stefan Nenchev
    Telerik by Progress
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Back to Top