
sitefinitysteve
Top achievements
Rank 2
Iron
Iron
Veteran
sitefinitysteve
asked on 28 Feb 2011, 08:13 PM
How do I get the clientside selected data key? Only thing I can find is DisplayIndex....and not sure if that's what I want (does the display index change for an item if it's collapsed and thus hidden?)
3 Answers, 1 is accepted
0
Hello Steve,
As of current, the RadTreeList client-side API does not expose the DataKeyValue, so it cannot be accessed directly. A possible way would be, if you have a column displaying this value, to get hold of the HTML element of the selected item and access the textContent of the cell in question, similar to:
This, however, may be hard to use, having in mind that the expand collapse buttons also take up cells.
Another thing you could try would be to register on the client the needed values from the ItemDataBound event of the RadTreeList control.
Regards,
Tsvetina
the Telerik team
As of current, the RadTreeList client-side API does not expose the DataKeyValue, so it cannot be accessed directly. A possible way would be, if you have a column displaying this value, to get hold of the HTML element of the selected item and access the textContent of the cell in question, similar to:
function
itemSelect(sender, eventArgs) {
var
item = eventArgs.get_item();
alert(item.get_element().cells[3].textContent);
}
This, however, may be hard to use, having in mind that the expand collapse buttons also take up cells.
Another thing you could try would be to register on the client the needed values from the ItemDataBound event of the RadTreeList control.
Regards,
Tsvetina
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0

Chris
Top achievements
Rank 1
answered on 09 Jun 2011, 08:19 PM
When will this be added to this control? Your other controls have this already.
"Another thing you could try would be to register on the client the needed values from the ItemDataBound event of the RadTreeList control."
What do you mean by this do you have an example?
We are trying to implement a client side row click that opens a new window passing some parameters to the url of the new window based on the row that is selected.
"Another thing you could try would be to register on the client the needed values from the ItemDataBound event of the RadTreeList control."
What do you mean by this do you have an example?
We are trying to implement a client side row click that opens a new window passing some parameters to the url of the new window based on the row that is selected.
0
Hello Chris,
We are enhancing the RadTreeList client-side API now and after the Q2 2011 release you would be able to use a built-in methods to achieve your goal.
Kind regards,
Iana
the Telerik team
We are enhancing the RadTreeList client-side API now and after the Q2 2011 release you would be able to use a built-in methods to achieve your goal.
Kind regards,
Iana
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.