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

Edit Mode on Row Selection

1 Answer 41 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jaime Weise
Top achievements
Rank 1
Jaime Weise asked on 09 Sep 2009, 05:21 AM
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.

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 09 Sep 2009, 05:49 AM
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
Tags
Grid
Asked by
Jaime Weise
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or