Jun 21, 2012, 6:40 AM
How get the selected tree node id using direct event ?
Hello ,
I am developing a category tree using Multi Node TreePanel Built From Code-Behind . Now i want to select the tree node get the category id using direct event but i can't ... please help me .By The way, In my Category Table the field name is CategoryId which is also primary key .... Code
I am developing a category tree using Multi Node TreePanel Built From Code-Behind . Now i want to select the tree node get the category id using direct event but i can't ... please help me .By The way, In my Category Table the field name is CategoryId which is also primary key .... Code
<ext:TreePanel ID="tpCategory" runat="server">
<DirectEvents>
<ItemClick OnEvent="tree_Click">
<ExtraParams>
<ext:Parameter Name="id" Value="node.id" Mode="Raw"/>
</ExtraParams>
</ItemClick>
</DirectEvents>
</ext:TreePanel>
public void tree_Click(object sender, DirectEventArgs e)
{
string id = e.ExtraParams["id"];
//string text = e.ExtraParams["node"];
X.Msg.Alert("Node Id", "id = " + id).Show();
//X.Msg.Alert("DirectEvent", text).Show();
//X.Msg.Alert("DirectEvent", e.ExtraParams["Nodeid"]).Show();
}
Last edited by nazmulrockon; Jun 21, 2012 at 2:21 PM.