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

[Solved] Drag-Drop Row in Hierarchical Grid - GetSelected Detail table row's item values javascript

1 Answer 111 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Hrushikesh Mokashi
Top achievements
Rank 1
Hrushikesh Mokashi asked on 21 Apr 2009, 11:06 AM
HI All,

I am appyling Drag-Drop on Hierarchical grid.
I am having two problems here.

1. After dropping a row of Hierarchical grid, I want to access these row items on " onrowDropping" javascript event.

<

 

clientevents onrowdropping="rowDropping" /> // This is how I am defining rowDropping.

function

 

rowDropping(sender, eventArgs) {

 

 

var grd = $find('<%=rGridUnscheduledSegments.ClientID %>');

 

 

var MasterTable = grd.get_masterTableView();

 

selectedRows = MasterTable.get_selectedItems();

 

var

 

row = selectedRows[0];

 

 

 

var

 

 UId = MasterTable.getCellByColumnUniqueName(row, "UserID")

 

 

...
...

}
In the above function, method "get_masterTableView();" is used for accessing Mastertable of the parent grid. This is npot applicable for Details table in Hierachical grid. 

2. While applying drag-drop for the hierarchical grid I want to lock Parent table drag-drop. i.e User should be able to drag a row from Hierarchical grid but not be able to drag a row  from the parent grid.


Can anyone please help me in this?


Best Regards,
Hrushikesh.

1 Answer, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 24 Apr 2009, 10:37 AM

Hello Hrushikesh,

It seems that you already received a reply from a community member in the other forum thread you opened with regards to the second part of your inquiry:

http://www.telerik.com/community/forums/aspnet-ajax/grid/disalbe-drag-drop-from-mastertable.aspx

Concerning the first question:
You can access the detail table on which the row has been dropped using the eventArgs.get_tableView() argument passed inside the OnRowDropping client handler.

Best regards,

Sebastian
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Hrushikesh Mokashi
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Share this question
or