This is a migrated thread and some comments may be shown as answers.

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

5 Answers 45 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Koen
Top achievements
Rank 1
Koen asked on 23 Mar 2016, 02:17 PM
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?

5 Answers, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 28 Mar 2016, 11:00 AM
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.
0
Koen
Top achievements
Rank 1
answered on 11 Apr 2016, 03:11 PM

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

0
Eyup
Telerik team
answered on 14 Apr 2016, 12:44 PM
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.
0
Koen
Top achievements
Rank 1
answered on 12 Aug 2016, 01:12 PM
Reason was that I was using grouping, and then GroupLoadMode="Client" should be used instead.
0
Eyup
Telerik team
answered on 17 Aug 2016, 12:13 PM
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.
Tags
Grid
Asked by
Koen
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Koen
Top achievements
Rank 1
Share this question
or