Command Item

3 posts, 1 answers
  1. Kim
    Kim avatar
    27 posts
    Member since:
    Sep 2010

    Posted 18 Mar 2012 Link to this post

    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. Answer
    msigman
    msigman avatar
    141 posts
    Member since:
    Apr 2008

    Posted 18 Mar 2012 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Kim
    Kim avatar
    27 posts
    Member since:
    Sep 2010

    Posted 19 Mar 2012 Link to this post

    Yes that did the trick. Thanks you! Now it seems so obvious.

Back to Top