RadGrid automatically groups data on Row Edit ended

6 posts, 0 answers
  1. Nivid
    Nivid  avatar
    14 posts
    Member since:
    Jun 2012

    Posted 13 Mar 2013 Link to this post

    I have a Radgrid where if i group by certain columns and then edit some rows data. It will automatically shift that row to the group that it should belong to. Is there any way i can stop this behavior.
  2. Nick
    Admin
    Nick avatar
    593 posts

    Posted 14 Mar 2013 Link to this post

    Hi Nivid,

    This is the expected behavior in such cases. Unfortunately you cannot go around it. The problem is that the GridView is processing the PropertyChanged events of the business object and matches the new criteria against the existing group descriptors, hence placing the item in their proper group. 

    May I ask you what exactly are you trying to achieve so I can suggest an alternative approach to tackle the problem?

    Looking forward to your response! 

    Regards,
    Nik
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. Nivid
    Nivid  avatar
    14 posts
    Member since:
    Jun 2012

    Posted 14 Mar 2013 Link to this post

    Hi Nik,
     Thanks for the quick response. 

    The reason why i asked to stop is there some data which if we try to edit them and it is automatically grouped we loose focus of the whole row where the user is trying to edit as there is a possibility of having multiple groups at the time and the user has to search for the row where it was shifted. because there are other fields to be edited too. Is there any workaround to stop or to cancel the autogrouping.

    Thanks

    Nivid
  4. Nick
    Admin
    Nick avatar
    593 posts

    Posted 14 Mar 2013 Link to this post

    Hello Navid,

    You can use the ScrollIntoView method of the GridView on Row/CellEditEnded event to bring the edited item into view no matter which group it has been moved to. 

    Let me know if this will work for you. 

    Kind regards,
    Nik
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  5. Nivid
    Nivid  avatar
    14 posts
    Member since:
    Jun 2012

    Posted 14 Mar 2013 Link to this post

    Hello Nik,
     Yes you are correct i can do that. but the issue that it will lead to will be the groups arent expanded and if we do that will it auto expand the groups?

    Thanks
    Nivid
  6. Vera
    Admin
    Vera avatar
    265 posts

    Posted 18 Mar 2013 Link to this post

    Hi Nivid,

    Indeed, the group will be automatically expanded. I have attached a simple project demonstrating the approach. Please take a look at it and let us know in case you have any further questions.

    Greetings,
    Vera
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top