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

Grid with Template Editor Form

1 Answer 49 Views
Grid
This is a migrated thread and some comments may be shown as answers.
susil
Top achievements
Rank 1
susil asked on 22 Nov 2012, 09:53 AM
Hi ,

I have a grid panel with  form template editor. In which i kept two cascading combo boxes and used ajaxpanel for avoiding  postback . The problem here is that i need a client side row add function in grid too ..... where as Ajax panel inside form doesn't allow automatic rowinsert or update. Hence i cant add the row to grid using POPUP form editor..


Any suggestions to overcome this ....?

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 27 Nov 2012, 09:12 AM
Hello Sumeshkumar,

You could fire an InitInsert command from client side:
http://www.telerik.com/help/aspnet-ajax/grid-gridtableview-firecommand.html

or to open an insert form by default and make it visible only when a given function is called:
protected void RadGrid1_DataBinding(object sender, EventArgs e)
{
    RadGrid1.MasterTableView.InsertItemDisplay = GridInsertItemDisplay.Bottom;
    RadGrid1.MasterTableView.EditMode = GridEditMode.InPlace;
    RadGrid1.MasterTableView.IsItemInserted = true;
}
protected void RadGrid1_PreRender(object sender, EventArgs e)
{
    RadGrid1.MasterTableView.GetInsertItem().Display = false;
}

JavaScript:
Copy Code
function openInsertForm() {
    var masterTable = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
    masterTable.get_insertItem().style.display = "";
}

I hope this will prove helpful.

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