Row selection highlight not working when grouped

4 posts, 0 answers
  1. Vikram
    Vikram avatar
    5 posts
    Member since:
    Dec 2011

    Posted 18 Sep 2020 Link to this post

    Hi,

     

    https://stackblitz.com/edit/react-gmfcy6-5rknaj

    In above example I'm using grouping and row selection as well.
    Issue is: row selection is not working when grouped. IF you remove grouping `unit in stock` and click on any row it will immediately highlight selected row.

     

    Thanks
    Vikram E.

  2. Stefan
    Admin
    Stefan avatar
    3039 posts

    Posted 22 Sep 2020 Link to this post

    Hello, Vikram,

    We have a GitHub discussion logged for this.

    We also made an example showcasing how it can be done with the current version:

    https://github.com/telerik/kendo-react/issues/500 (the example from Ina)

    I hope this is helpful.

    Regards,
    Stefan
    Progress Telerik

    Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).

  3. Vikram
    Vikram avatar
    5 posts
    Member since:
    Dec 2011

    Posted 23 Sep 2020 in reply to Stefan Link to this post

    Hi Stefan,

    Seems like you've misunderstood. I'm not worried about persistence.
    My Issue is with row selection (onClick of a row) highlight with is not working when grouped.

    When not grouped, OnClick of a row I'm selecting a row (& highlighting it);
    This row selection and highlighting isn't working when any column is grouped.

  4. Stefan
    Admin
    Stefan avatar
    3039 posts

    Posted 23 Sep 2020 Link to this post

    Hello, Vikram,

    The issue is ultimately the same.

    When the records are grouped, the data collection is completely new (new reference), which means that the selected field gets removed during the grouping process.

    This is why we have to use the approach shown in the GitHub issue to re-apply the selection state to the records after the data is processed.

    Regards,
    Stefan
    Progress Telerik

    Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Back to Top