I have an Asp.net treeview and am building the nodes programmatorically in my codebehind.
Now, this treeview is 3 levels deep, being ROOT -> CATEGORY -> Tasks belonging to this category. I would now like to allow the user to drag these leaf tasks to another table, but only the leafs should be draggable (I'm using the Jquery draggable plugin for this, s开发者_JAVA百科o I just need to set the css class).
Any idea how I can set the CSS class for the leaf node only (codebehind or js)? I've tried something like:
<asp:treeview id="treeviewTasks" runat="server" leafnodestyle="draggable" />
but that doesn't seem to do the trick :(
thanks
Sam
Turned out I was almost there, but not quite. The correct syntax is:
<asp:treeview id="treeviewTasks" runat="server" leafnodestyle-cssclass="draggable hand"/>
RTM I guess :)
精彩评论