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

Dynamically created dynamic grids not refreshing

1 Answer 54 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ben
Top achievements
Rank 1
Ben asked on 14 May 2015, 07:39 AM

Hi,

I have a requirement for users to be able to select and add grids to a page without knowing the table schema beforehand.

I have a partial view to display a grid from any given data table using initial Server Binding with Ajax updates. When adding several of these grids to a view using Html.Action they work as expected.

However, when I add the above grids dynamically using an Ajax.BeginForm request the grids initially display correctly but any refreshes or page changes causes an error. The dynamically added grids are rendered differently (eg. missing data-role="grid") and they send HTTP GET requests instead of HTTP POST.

I've attached the Controller and Views I'm using for testing.

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 18 May 2015, 06:35 AM
Hello Ben,

There are no files attached to your message, but generally, you need to keep in mind the following:

- The Kendo UI widgets are client-side widgets. They do not have server-side instances and do not persist their state across page reloads. If this is a required behavior, you need to take care of it via custom logic.

- Make sure that each Grid instance has a unique ID. Widgets with duplicate IDs will not initialize or work correctly.

- Make sure that each Grid instance is initialized only once per page load

In case you need further assistance, please provide a standalone runnable example for testing.

Regards,
Dimo
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
Ben
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or