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

ajaxify a GridTemplateColumn column

1 Answer 34 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sihanook
Top achievements
Rank 1
Sihanook asked on 06 Jul 2012, 06:05 PM
Hello,

I am pretty new to Rad controls, so please point me to articles that help explain this, but this is what I am trying to do.

I used a RadGrid control on my page, and included a GridTemplateColumn column in my grid by implementing the ITemplate interface. The template column is essentially a list of items in a drop down. This is working beautifully, but now I want the rest of the columns in the row to be updated accordingly when a user changes a value in the drop down of this Template column. I want to do this without doing a complete postback to the server.

Any help on how I can do this *correctly* would be greatly appreciated. I have been reading various articles and trying out things, but nothing is working too well.

Also, I don't know if this matters, but the data for my grid and the structure of the grid is completely created at run time without using any SqlDataSource controls.

Appreciate any input,
Thank you!

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 09 Jul 2012, 02:28 PM
Hi Sihanook,

Please ensure that you are following the steps described in the following article:
RadGrid Programmatic Creation
Such as:
- Creating columns in the Page_Load event handler does not work for template columns. For the controls inside a template to persist their ViewState, the grid must be generated completely in the code-behind using the Page_Init event
- When generating a grid in the Page_Init event handler, grid columns should be added to the Columns collection of the MasterTableView after their attributes are set

In order to prevent the RadGrid commands to raise a complete page postback, you could ajaxify the grid using RadAjaxManager. Please check out the following articles to get familiar with RadAjax:
 RadAjaxManager Overview
RadAjaxLoadingPanel Overview
RadAjax and MasterPage

You could also refer to various grid demos where loading is applied to get a practical idea of its implementation.

Greetings,
Eyup
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Sihanook
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or