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

Command Item

2 Answers 35 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kim
Top achievements
Rank 1
Kim asked on 18 Mar 2012, 11:30 PM
Hi, i want to is the "Add" command item to pop up a rad window. I was able to get it to work by create a javascript function and setting setting;


OnCommand="Command_Clicked"

How do i prevent the insert field from appearing on the grid?

Thanks.

2 Answers, 1 is accepted

Sort by
0
Accepted
msigman
Top achievements
Rank 2
answered on 19 Mar 2012, 02:15 AM
Hi Kim,

I'm not sure that I clearly understand your request, but I believe you've implemented an Add button that is separate from the RadGrid control itself, and you're finding that when you click it the window pops up as expected, however the RadGrid also goes into inline insert mode.  So your question is, how do you stop it from going into inline insert mode.

I believe you can achieve the desired functionality by simply canceling the InsertCommand event as it occurs on the RadGrid, like this:
private void RadGrid1_InsertCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
{
    e.Canceled = true;
}

If I've misunderstood your question, please accept my apologies and try to explain it to us again.

Thanks!

References
http://www.telerik.com/help/aspnet-ajax/grid-inserting-values-inplace-and-editforms.html
http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/alleditablecolumns/defaultcs.aspx
0
Kim
Top achievements
Rank 1
answered on 19 Mar 2012, 07:10 AM
Yes that did the trick. Thanks you! Now it seems so obvious.

Tags
Grid
Asked by
Kim
Top achievements
Rank 1
Answers by
msigman
Top achievements
Rank 2
Kim
Top achievements
Rank 1
Share this question
or