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

Add a new row with input controls to grid on client-side

1 Answer 64 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Anton
Top achievements
Rank 1
Anton asked on 14 Jan 2009, 10:41 AM
Hi!
I have a radgrid with template columns which contains ASP.NET controls inside, like textboxes, some ajax-extenders etc. The datasource is a List of speacial objects with appropriate properties, and controls are binded to these objects.
Then I try to add a row in the grid using approach like this http://demos.telerik.com/aspnet-ajax/Grid/Examples/Client/InsertUpdateDelete/DefaultCS.aspx and I see that new row is added but input fields are not added to table cells.
Any suggestion where have I failed?

PS I don't want to use InPlace Edit mode because each new row should be switched to this mode, but this action causes postback. Also I don't see any ability to use RadAjax because it may conflict with MS UpdatePanels used in my page.

1 Answer, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 15 Jan 2009, 08:04 AM
Hello Anton,

I'm afraid that dynamically creating controls in template columns with client-side binding (meaningful for html controls since server controls cannot be instantiated purely on the client) is not supported in the present version of RadGrid for ASP.NET AJAX.
As a workaround you may consider intercepting the OnRowDataBound client event of the grid (as in this demo) and inject an html control inside the respective template column cell.

Kind regards,
Rosen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Anton
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Share this question
or