I am trying to use Telerik's RadDropDownTree control and I have stucked to a problem.
What I want to succeed: I want to select specific nodes (check the checkboxes and update the entries area) from the drop down tree from client side (on 'click' event).
HTML
<telerik:RadDropDownTree
runat="server"
ID="ddtAtfcDepartment"
Width="500px"
Skin="MetroTouch"
EnableFiltering="true"
DefaultValue="NULL"
CheckBoxes="SingleCheck"
DataTextField="Descr"
DataFieldID="ID"
DataValueField="ID"
DataFieldParentID="ParentID"
OnClientDropDownOpening="setDdtWidth"
AutoPostBack="false">
<ButtonSettings ShowClear="true" />
<DropDownSettings
Width="99%"
Height="300px"
CssClass="shiftsFilterSector"
CloseDropDownOnSelection="false"
AutoWidth="Enabled" />
<FilterSettings Highlight="Matches" EmptyMessage="Πληκτρολογήστε για εύρεση" Filter="Contains" />
</telerik:RadDropDownTree>
jQuery
That's how I'm trying to select the nodes in the list. They actually get checked, but the entries area is empty (not selected).
var tree = ddtAtfcDepartment.get_embeddedTree();
var list = [1026,1023] //The list of values I want to check/select
if (tree && list.length > 0) {
$.each(list, function (i, val) {
tree.findNodeByValue(val).check();
});
}
I've read here that if the checkboxes are enabled, you must use the SyncEmbeddedTree() method to update the entries area, but this is server side method and I am unable to find the corresponding client side method.
Any idea is welcome!
Aucun commentaire:
Enregistrer un commentaire