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

DblClick

1 Answer 37 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Christoph
Top achievements
Rank 1
Christoph asked on 20 Nov 2008, 06:23 PM
Hello!

Maybe someone can help me!
I'd like to have the row after double click in edit mode. - That's no problem so far:

eventArgs.get_tableView().editItem(eventArgs.get_itemIndexHierarchical());

i'd also like to close the edit mode after double click, when it is in edit mode:

 

eventArgs.get_tableView().cancelUpdate(eventArgs.get_itemIndexHierarchical());
Therefore i can't find a client side property, where i can get the information if the row is in edit mode or not!
Please help me - thank you!

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 21 Nov 2008, 10:36 AM
Hi,

Give a try with the following approach and see if it helps to some extent.

JS:
<script type="text/javascript"  language="javascript" > 
 function OnRowDblClick(sender, eventArgs) 
 { 
 //setting the row in edit mode
 eventArgs.get_tableView().editItem(eventArgs.get_itemIndexHierarchical()); 
  
  //getting the hidden element 
  var hidden=document.getElementById("Hidden1"); 
  //cancel the row in edit mode 
  if(hidden.value=="1") 
  eventArgs.get_tableView().cancelUpdate(eventArgs.get_itemIndexHierarchical()); 
 } 
</script> 

CS:
 protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e) 
    { 
        if (e.CommandName == "Edit") 
        { 
            Hidden1.Value = "1"
        } 
        else if (e.CommandName == "Cancel") 
        { 
            Hidden1.Value = "2"
        } 
        
    } 
 

ASPX:
 <input id="Hidden1" type="hidden"   runat="server" /> 

Thanks
Shinu.
Tags
Grid
Asked by
Christoph
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or