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

Dynamic Grid Clientside binding

1 Answer 103 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sai
Top achievements
Rank 1
Sai asked on 28 May 2015, 07:45 AM

Hi

I am Creating a Grid dynamically. I dont know how many columns will be there it is based on the login user. 

Is there any why to bind that Grid clientside?

 

Thanks & Regards

Saicharan.D

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 02 Jun 2015, 07:35 AM
Hi Saicharan,

Generally, RadGrid supports client-side binding, however, this scenario does not support autogenerated columns:
http://www.telerik.com/forums/autogeneratecolumns-and-client-binding#sPYF6DnlM0WW9sTWuu3NZw

The grid columns should be created on the server-side. You can achieve that by simply providing your data source using the NeedDataSource event handler provided by RadGrid and enable the AutoGenerateColumns property:
http://www.telerik.com/help/aspnet-ajax/grid-advanced-data-binding.html

Alternatively, you can create and configure your columns programmatically:
http://www.telerik.com/help/aspnet-ajax/grid-programmatic-creation.html#Section22

Here you can find a similar scenario:
http://www.telerik.com/help/aspnet-ajax/grid-changing-structure-dynamically.html

Hope this helps.

Regards,
Eyup
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
Sai
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or