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

RowClick on Child Grid

3 Answers 68 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Brett Archer
Top achievements
Rank 1
Brett Archer asked on 02 Mar 2011, 06:22 AM
Trying to force a child grid into in-line edit mode based upong a rowclick on the client.

Using rowclick fires for the parent grid (really don't want that to happen) and I get a Javascript "Object Required" error when I click on the child grid row.  The JS function I'm using looks like this:

<

 

script type="text/javascript">

 

 

function RowClick(sender, eventArgs) {

 

 

alert("Click on row instance: " + eventArgs.get_itemIndexHierarchical());

 

sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical());

 

 

}

 

 

 

</script>

How can I stop the click on the parent and actually have it not generate and start the in-line edit on the client?    

 

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 02 Mar 2011, 08:56 AM
Hello,


A better approach is checking for the table view name from client side and based on that make the row in editmode.

A sample code is shown below:
function OnRowClick(sender, eventArgs) {
 
    if (eventArgs.get_tableView().get_name() != "Master") {
        sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical());
    }
}


-Shinu.
0
Brett Archer
Top achievements
Rank 1
answered on 03 Mar 2011, 01:36 AM
Ya, I still get the same "object required" javascript error with that code.
0
Shinu
Top achievements
Rank 2
answered on 03 Mar 2011, 11:13 AM
Hello Brett,

That issue is there in older version. Please try to update the new  Telerik version and see if it eliminates the error.

-Shinu.
Tags
Grid
Asked by
Brett Archer
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Brett Archer
Top achievements
Rank 1
Share this question
or