This is a discussion on How to postback the checkbox value in treeview when each time it is checked ? within the ASP and ASP.NET Programming forums, part of the Web Development category; How to postback the checkbox value in treeview when each time it is checked? (in asp.net) for example we ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| How to postback the checkbox value in treeview when each time it is checked? (in asp.net) for example we have the <treeview control coding here> ..... .................... <asp:TreeView ID="TreeView1" ImageSet="Msdn" ExpandDepth="1" CssClass="text1" ShowCheckBoxes="All" runat="server" Width="600px"> <RootNodeStyle Width="400px" ChildNodesPadding="1px" Height="20px" CssClass="text1" BackColor="White" /> .............. ............. and the value for that are assigned to it from the database when the page is loaded .............. ............. TreeNode root = new TreeNode(); root.Text = ParentNode[loop, 1]; SqlConnection SqlCon = new SqlConnection("") SqlCon.Open(); SqlCommand SqlCmd = new SqlCommand( sql statement , SqlCon); while (Sdr.Read()) { ParentNode[count, 0] = Sdr.GetValue(Sdr.GetOrdinal("SysMenuID")).ToString (); ParentNode[count++, 1] = Sdr.GetValue(Sdr.GetOrdinal("Name")).ToString(); ............. ............. now the problem is when the page is loaded .. we get all the values for the checkboxes displayed using the Treeview control but when we click the check box and submit the page ..how to get the value of the check box ..? when try to get the id of checked box foreach(TreeNode root in TreeView1.CheckedNodes) { checkmessage.Text = how to get the ParentNode id ..? } |
| Sponsored Links |
![]() |
| Thread Tools | |
| Display Modes | |
| |
LinkBacks (?)
LinkBack to this Thread: http://www.discussweb.com/asp-asp-net-programming/1741-how-postback-checkbox-value-treeview-when-each-time-checked.html | |||
| Posted By | For | Type | Date |
| How to postback the checkbox value in treeview when each time it ... | Web Hosting | This thread | Refback | 10-29-2007 03:12 PM |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| count the time in seconds that a checkbox is really checked | itbarota | HTML, CSS and Javascript Coding Techniques | 1 | 02-13-2008 10:16 PM |
| I am having checkbox in datagrid and treeview, while click the button i need to check | kingmaker | C# Programming | 3 | 08-14-2007 09:39 AM |
| I have a TreeView control in one of my webpages and I am facing the following problem | itbarota | C# Programming | 1 | 07-27-2007 05:33 AM |
| When should u use a checked & unchecked exception in java? | H2o | Java Programming | 1 | 07-24-2007 03:47 AM |
| Checked and UnChecked Exception | sivakumar | Java Programming | 1 | 07-12-2007 04:01 AM |