grid edit

2 posts, 0 answers
  1. John
    John avatar
    6 posts
    Member since:
    Jun 2008

    Posted 12 Mar 2009 Link to this post

    Issue 1

    I have a radgrid inside a tree view control.  Is it possible to put that grid into inline edit mode.  I figure I have to use the client side OnCommand function to put the identifying data for the row that needs to be edited into a hidden variable so when the grid is recreated on the server side that row can be put into edit mode.  The problem I am having is how to get the data I need from the grid on the client side.

    Here is what I have so far.

    serverside grid definition (partial)

    _TreeGrid =

    new RadGrid();

     

    _TreeGrid.ID =

    "radDG" + _gridType;

     

    _TreeGrid.Skin =

    "Office2007";

     

    _TreeGrid.Width = 800;

    _TreeGrid.AutoGenerateColumns =

    false;

     

    _TreeGrid.ClientSettings.Selecting.AllowRowSelect =

    true;

     

    _TreeGrid.AllowMultiRowSelection =

    true;

     

     

    //bind the client side events

     

    _TreeGrid.ClientSettings.ClientEvents.OnRowCreated =

    "RowCreated";

     

    _TreeGrid.ClientSettings.ClientEvents.OnRowCreating =

    "RowCreating";

     

    _TreeGrid.ClientSettings.ClientEvents.OnRowSelected =

    "RowSelected";

     

    _TreeGrid.ClientSettings.ClientEvents.OnRowDeselected =

    "RowUnselected";

     

    _TreeGrid.ClientSettings.ClientEvents.OnCommand =

    "GridCommand";

     



    server side javascript

     

    function GridCommand(sender, args)

     

    {

     

    grid = sender;

     

    dataItems = grid.get_masterTableView().get_dataItems();

     

    }

    Thanks

    John

  2. Yavor
    Admin
    Yavor avatar
    11 posts

    Posted 16 Mar 2009 Link to this post

    Hello John,

    On the client, you can either use the editItem client side handler for a single item, or the editselecteditems to edit multiple items. In addition, you can use the fireCommand client side method, to fire a custom command, which can be used to put multiple items in edit mode from the server.
    I hope these suggestions help.

    Best wishes,
    Yavor
    the Telerik team


    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top