Edit Mode on Row Selection

2 posts, 0 answers
  1. Jaime Weise
    Jaime Weise avatar
    25 posts
    Member since:
    Nov 2008

    Posted 09 Sep 2009 Link to this post

    Hi there,

    Instead of having an edit link I would like the formtemplate to show up as the row has been selected. Seem like it should be simple enough. I guess I am missing the setting.

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 09 Sep 2009 Link to this post

    Hi Jaime,

    You can achieve this either in the ItemCommand or SelectedIndexChanged event. Set the EnablePostBackOnRowClick property of the Grid to true.

    Here is the sample code:

    ASPX:
     
     <ClientSettings EnablePostBackOnRowClick="true" > 
       <Selecting  AllowRowSelect="true" /> 
     </ClientSettings> 

    CS:
     
     protected void RadGrid2_ItemCommand(object source, GridCommandEventArgs e) 
        { 
            if (e.CommandName == "RowClick"
            { 
                e.Item.Edit = true
            } 
            RadGrid2.MasterTableView.Rebind(); 
        } 

    Regards
    Shinu
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top