I have a RadDropDownTree and i want to set the selected value, I do this with the ddtDiagCategorie_OnNodeDataBound, my node is selected in the list when i open it, but th text is not dispay at first time, I tried with DefaultMessage property with no result. I was thinking that the right manner was using the SelectedText or SelectedValue like a normal dropdown, but th property is readonly, how does I have to do this. (The big consequence is after a modify, if the user don't go to selecte the value in the DropDownTree, he save an empty value in the database...)
My code on the event :
My code on the event :
protected
void
ddtDiagCategorie_OnNodeDataBound(
object
sender, DropDownTreeNodeDataBoundEventArguments e)
{
if
(BilletCourant !=
null
&& BilletCourant.IdCategorie.HasValue)
{
if
(e.DropDownTreeNode.Value.Equals(BilletCourant.IdCategorie.Value.ToString()))
{
e.DropDownTreeNode.CreateEntry();
}
}
//ExpandAllNodes sur ce contrĂ´le
e.DropDownTreeNode.Expanded =
true
;
}