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

Show Edit Template on Rowclick

2 Answers 98 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Joshua
Top achievements
Rank 1
Joshua asked on 19 May 2008, 08:01 AM
Good Day.

I have been pulling my hair out trying to get this to work.  I have an edit template that i have been trying to show on row click.  I have tried to modify the sample of row double click and have been unsuccessful in doing so.  Is there anyone out there that has successfully accomplished this task?

Also, one more thing you might be able to help me with.  I am trying to show and image only on row mouse over.  and once the row is click(as stated above), keep this picture showing.  onrowmouseout, the image would disappear.  Not just mousing over the image, but mouse over the row.  Any help would be greatly appreciated.

Thanks
Joshua

2 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 19 May 2008, 09:46 AM
Hi Joshua,

Try the following code snippet to put a Grid row in edit mode on clicking the Row.

ASPX:
<ClientSettings EnablePostBackOnRowClick="True"   > 
                </ClientSettings> 


CS:
  protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e) 
    { 
        if (e.CommandName == "RowClick") 
        { 
            GridDataItem item = (GridDataItem)e.Item; 
            item.Edit = true
            RadGrid1.Rebind(); 
        } 
   } 


Thanks
Shinu.

0
binbin
Top achievements
Rank 1
answered on 10 Sep 2008, 03:43 AM
Hi shinu

I have try to use your code, but i found when click delete button it is also go to edittemplate.

I think the reason is, when i click on "delete" button The RowClick event also be fire. so do you know how to forbit it.
Tags
Grid
Asked by
Joshua
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
binbin
Top achievements
Rank 1
Share this question
or