|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
treeview asp.net 2.0Hi,
Is there way to know how many nodes have been checked total in the tree view from the client side (java script)? Thanks, Jasmine Jasmine,
The TreeView server control does not provide client-side functions such as the number of checked items on the TreeView or changing the colors of the checked nodes. All these activities have to be done using JavaScript. http://www.webswapp.com/codesamples/aspnet20/treeview/ In this demo I perform the following JavaScript manipulations: 1- Count the number of checked nodes 2- Suppress the ToolTip display when the mouse if hovered over the checkbox Show quoteHide quote "Jasmine" wrote: > Hi, > > Is there way to know how many nodes have been checked total in the tree view > from the client side (java script)? > > Thanks, Jasmine Hi Phillp,
Thank you very much for answering my question. Your demo is great! May I ask you how could I binding the tree view check box with the grid view besides it, every time the node get checked,the node value (such as student ID) will pass to grid view, a new row with the selected student ID will append to grid view. if the node unchecked, the row is the grid view will get removed, it is for client side only (for UI, it won't affect database). I try to use the "OnTreeNodeCheckChanged="treeview1_TreeNodeCheckChanged"),it doesn't triger the event at all, do you have any idea how to implement it? Thank you very much, Jasmine Show quoteHide quote "Phillip Williams" wrote: > Jasmine, > > The TreeView server control does not provide client-side functions such as > the number of checked items on the TreeView or changing the colors of the > checked nodes. All these activities have to be done using JavaScript. > > http://www.webswapp.com/codesamples/aspnet20/treeview/ > > In this demo I perform the following JavaScript manipulations: > 1- Count the number of checked nodes > 2- Suppress the ToolTip display when the mouse if hovered over the checkbox > > -- > HTH, > Phillip Williams > http://www.societopia.net > http://www.webswapp.com > > > "Jasmine" wrote: > > > Hi, > > > > Is there way to know how many nodes have been checked total in the tree view > > from the client side (java script)? > > > > Thanks, Jasmine Jasmine,
According to the TreeView documentation on the MSDN: "The TreeView control does not expose an AutoPostBack property. Thus, to submit check box selections, you must place a control, such as a Button Web server control, on the page to post information back to the server." http://msdn2.microsoft.com/en-us/library/ms178259.aspx To be able to make use of that event you need to have another control that triggers the PostBack, like I did in this demo: http://www.webswapp.com/codesamples/aspnet20/treeview/TreeNodeCheckChanged.aspx Show quoteHide quote "Jasmine" wrote: > Hi Phillp, > > Thank you very much for answering my question. Your demo is great! > > May I ask you how could I binding the tree view check box with the grid view > besides it, every time the node get checked,the node value (such as student > ID) will pass to grid view, a new row with the selected student ID will > append to grid view. if the node unchecked, the row is the grid view will > get removed, it is for client side only (for UI, it won't affect database). > > I try to use the > "OnTreeNodeCheckChanged="treeview1_TreeNodeCheckChanged"),it doesn't triger > the event at all, do you have any idea how to implement it? > > Thank you very much, Jasmine > > "Phillip Williams" wrote: > > > Jasmine, > > > > The TreeView server control does not provide client-side functions such as > > the number of checked items on the TreeView or changing the colors of the > > checked nodes. All these activities have to be done using JavaScript. > > > > http://www.webswapp.com/codesamples/aspnet20/treeview/ > > > > In this demo I perform the following JavaScript manipulations: > > 1- Count the number of checked nodes > > 2- Suppress the ToolTip display when the mouse if hovered over the checkbox > > > > -- > > HTH, > > Phillip Williams > > http://www.societopia.net > > http://www.webswapp.com > > > > > > "Jasmine" wrote: > > > > > Hi, > > > > > > Is there way to know how many nodes have been checked total in the tree view > > > from the client side (java script)? > > > > > > Thanks, Jasmine Hi Phillip,
Thank you very much, could I check the parent node, and the subnodes in the tree get checked automaticlly ? Show quoteHide quote "Phillip Williams" wrote: > Jasmine, > > According to the TreeView documentation on the MSDN: "The TreeView control > does not expose an AutoPostBack property. Thus, to submit check box > selections, you must place a control, such as a Button Web server control, on > the page to post information back to the server." > http://msdn2.microsoft.com/en-us/library/ms178259.aspx > > To be able to make use of that event you need to have another control that > triggers the PostBack, like I did in this demo: > http://www.webswapp.com/codesamples/aspnet20/treeview/TreeNodeCheckChanged.aspx > > -- > HTH, > Phillip Williams > http://www.societopia.net > http://www.webswapp.com > > > "Jasmine" wrote: > > > Hi Phillp, > > > > Thank you very much for answering my question. Your demo is great! > > > > May I ask you how could I binding the tree view check box with the grid view > > besides it, every time the node get checked,the node value (such as student > > ID) will pass to grid view, a new row with the selected student ID will > > append to grid view. if the node unchecked, the row is the grid view will > > get removed, it is for client side only (for UI, it won't affect database). > > > > I try to use the > > "OnTreeNodeCheckChanged="treeview1_TreeNodeCheckChanged"),it doesn't triger > > the event at all, do you have any idea how to implement it? > > > > Thank you very much, Jasmine > > > > "Phillip Williams" wrote: > > > > > Jasmine, > > > > > > The TreeView server control does not provide client-side functions such as > > > the number of checked items on the TreeView or changing the colors of the > > > checked nodes. All these activities have to be done using JavaScript. > > > > > > http://www.webswapp.com/codesamples/aspnet20/treeview/ > > > > > > In this demo I perform the following JavaScript manipulations: > > > 1- Count the number of checked nodes > > > 2- Suppress the ToolTip display when the mouse if hovered over the checkbox > > > > > > -- > > > HTH, > > > Phillip Williams > > > http://www.societopia.net > > > http://www.webswapp.com > > > > > > > > > "Jasmine" wrote: > > > > > > > Hi, > > > > > > > > Is there way to know how many nodes have been checked total in the tree view > > > > from the client side (java script)? > > > > > > > > Thanks, Jasmine Hi Jasmine,
Taken that the Microsoft TreeView control does not expose a method for programming the onclick event of the checkbox, I do not think that you can extend it to do this function. You can probably add another button where you process the checkboxes on the server side using the TreeNodeCheckChanged event. Though I think it would not be intuitive for the user. You might find it easier writing a custom control that implements the specific functions that you required. It can be done using a datalist or a datarepeater. I found it much easier creating my TreeView for navigating to the City of North Vancouver website www.cnv.org BTW, your other thread where you asked about the GridView Hyperlink, did you find the answer that you were looking for? Show quoteHide quote "Jasmine" wrote: > Hi Phillip, > > Thank you very much, could I check the parent node, and the subnodes in the > tree get checked automaticlly ? > > > > "Phillip Williams" wrote: > > > Jasmine, > > > > According to the TreeView documentation on the MSDN: "The TreeView control > > does not expose an AutoPostBack property. Thus, to submit check box > > selections, you must place a control, such as a Button Web server control, on > > the page to post information back to the server." > > http://msdn2.microsoft.com/en-us/library/ms178259.aspx > > > > To be able to make use of that event you need to have another control that > > triggers the PostBack, like I did in this demo: > > http://www.webswapp.com/codesamples/aspnet20/treeview/TreeNodeCheckChanged.aspx > > > > -- > > HTH, > > Phillip Williams > > http://www.societopia.net > > http://www.webswapp.com > > > > > > "Jasmine" wrote: > > > > > Hi Phillp, > > > > > > Thank you very much for answering my question. Your demo is great! > > > > > > May I ask you how could I binding the tree view check box with the grid view > > > besides it, every time the node get checked,the node value (such as student > > > ID) will pass to grid view, a new row with the selected student ID will > > > append to grid view. if the node unchecked, the row is the grid view will > > > get removed, it is for client side only (for UI, it won't affect database). > > > > > > I try to use the > > > "OnTreeNodeCheckChanged="treeview1_TreeNodeCheckChanged"),it doesn't triger > > > the event at all, do you have any idea how to implement it? > > > > > > Thank you very much, Jasmine > > > > > > "Phillip Williams" wrote: > > > > > > > Jasmine, > > > > > > > > The TreeView server control does not provide client-side functions such as > > > > the number of checked items on the TreeView or changing the colors of the > > > > checked nodes. All these activities have to be done using JavaScript. > > > > > > > > http://www.webswapp.com/codesamples/aspnet20/treeview/ > > > > > > > > In this demo I perform the following JavaScript manipulations: > > > > 1- Count the number of checked nodes > > > > 2- Suppress the ToolTip display when the mouse if hovered over the checkbox > > > > > > > > -- > > > > HTH, > > > > Phillip Williams > > > > http://www.societopia.net > > > > http://www.webswapp.com > > > > > > > > > > > > "Jasmine" wrote: > > > > > > > > > Hi, > > > > > > > > > > Is there way to know how many nodes have been checked total in the tree view > > > > > from the client side (java script)? > > > > > > > > > > Thanks, Jasmine
asp.net 2.0 treeview control - very slow
DataGrid not responding to Update/Cancel click Get data, make textBoxes, edit values, and re-save to database. Simple? A question about Repeater control Datagrid soes not page nor edits Menu Control - SubItem Shadows Flickering imagebutton with smartnavigation on Any Help on TabStrip Control?? Gridview hypterlink colomn to popup a new window disabling back button of window |
|||||||||||||||||||||||