RadGrid - Collapsing or expanding a group removes the entered but non-saved data

6 posts, 0 answers
  1. Koen
    Koen avatar
    7 posts
    Member since:
    Mar 2016

    Posted 23 Mar Link to this post

    Hi, I have a RadGrid with collapsed rows. If I expand group 1 and modify data, and then expand group 2 to enter more data, the data in group1 is gone. Is this a bug or am I doing something wrong?
  2. Eyup
    Admin
    Eyup avatar
    3005 posts

    Posted 28 Mar Link to this post

    Hi Koen,

    Generally, the state of the controls in grid templates or edit mode will reset its state on rebinding operations. Therefore, you can try to change the HierarchyLoadMode to Client or ServerBind:
    http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/hierarchical-grid-types-and-load-modes/hierarchy-load-modes

    Regards,
    Eyup
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Koen
    Koen avatar
    7 posts
    Member since:
    Mar 2016

    Posted 11 Apr Link to this post

    Hi Eyup, that does not seem to do the trick. The value is still modified.

    I have AllowExpandCollapse="True" in the ClientSettings and I have HierarchyLoadMode="Client" in the MasterTableView

  5. Eyup
    Admin
    Eyup avatar
    3005 posts

    Posted 14 Apr Link to this post

    Hi Koen,

    Could you please make sure that you are not using DataBind() to bind the grid? Performing complex grid operations such as Inserting, Deleting, Updating, Hierarchy relations, Grouping, Exporting, Paging, Sorting, Filtering, etc. require accommodating appropriate database operations.  Therefore, we suggest you to avoid Simple Databinding and strongly recommend the use of more advanced databinding methods, which automatically handle the aforementioned functions:
    Declarative DataSource
    Programmatic Data Binding
    (NeedDataSource and DetailTableDataBind event)


    You should set the DataSource property only within these event handlers.

    Also, temporarily disable any AJAX on the page if present (RadAjaxManager, RadAjaxPanel, UpdatePanel, etc.) and enable your script debugger (FireBug or F12) to see whether there are any script or server errors interfering.


    Regards,
    Eyup
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  6. Koen
    Koen avatar
    7 posts
    Member since:
    Mar 2016

    Posted 12 Aug in reply to Eyup Link to this post

    Reason was that I was using grouping, and then GroupLoadMode="Client" should be used instead.
  7. Eyup
    Admin
    Eyup avatar
    3005 posts

    Posted 17 Aug Link to this post

    Hi Koen,

    Even then, using DataBind() is not recommended. You should one of the approaches referenced in my previous reply.

    Regards,
    Eyup
    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017