CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > starter_kits_and_source_projects.internet_explorer_web_controls Tags:
Item Type: NewsGroup Date Entered: 8/16/2005 9:29:49 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 0 Views: 97 Favorited: 0 Favorite
1 Items, 1 Pages 1 |< << Go >> >|
iekhan
Asp.Net User
Problems with Checkbox in TreeView8/16/2005 9:29:49 PM

0

Problem Description - I have three tables in the database ?
    ?      Functions
    ?      Sub-Functions
    ?      Test Cases

Each function has specific sub-functions and subsequently each sub-function have a number of test cases. Now, I have to let the user select which test
cases he/she wants to select before going on to carry on other tasks with them. They way I have to represent them have been portrayed in the following picture  -   http://pg.photos.yahoo.com/ph/naughty_boy05/detail?.dir=/1186&.dnm=2380.jpg&.src=ph
                       
I would be having two sections on my page. The first section will initially display all the available functions. If a user clicks on a function, he can
further see the sub-functions underneath it and subsequently its test-cases. Each function/sub-function/test-case has a check box adjacent
to them. If the user checks it, and then hits the ?R? button in the middle of the two sections, then all the checked functions/sub-functions/test-cases should be moved over to the ?Section B?. The user will also have the flexibility to remove any function/sub-function/test-case from ?Section B? back to ?Section A? by using the linkbutton ?L?.

*****************************************************************************

Now, I could think of two ways of doing it (a) Using TreeView  (b) Using Panels.

Since TreeView sounds best for it, I have started playing with it. I can create TreeViews from my db using code behind. Also, using the code given in - http://forums.asp.net/301440/ShowPost.aspx I am able to check the parent checkboxes if all the child nodes are checked and so on. Now, I have added a web form button and on its click I want to find out all the checkboxes that have been checked so that I can place them on a new treeview for Sectoin B. Just to experiment, I wrote the follwoing fuction which I am calling on Button Click:

                   private void GetCheckedValues(TreeNodeCollection myNodes)  //myNodes is basically TreeView1.Nodes
                   {
                                     
foreach(TreeNode i in myNodes)
                                      {
                                                         if(i.Type == "folder")  //While creating the nodes, I have made all 1st level nodes as folders and the second level nodes as files.
                                                         { GetCheckedValues(i.Nodes); }
                                                        
else
                                                        
{
                                                                           
if(i.Checked)
                                                                            lblChecked.InnerText += i.Text.ToString(); // Simply placing their text into a label
                                                         }
                                      }                   
                   }

To my astonishment, all the nodes in this show up as Checked="false" and hence the lblChecked label turns out to be empty.

It would be great if someone can tell me why is all the value coming as unchecked in the post back / code behind. Also, is treeview the best approach for this problem or using panels would have been a better idea.


Since I am a novice to ASP.NET, any input will be really appreciated.
1 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Visual Basic.NET black book Authors: Steven Holzner, Pages: 1144, Published: 2002
Programming Visual Basic .NET Authors: Jesse Liberty, Dave Grundgeiger, Pages: 541, Published: 2003
Programming ASP.NET Authors: Jesse Liberty, Dan Hurwitz, Pages: 930, Published: 2006
WPF Recipes in C# 2008: A Problem-Solution Approach Authors: Sam Noble, Allen Jones, Sam Bourton, Pages: 700, Published: 2008
Learning C# 3.0 Authors: Jesse Liberty, Brian MacDonald, Pages: 665, Published: 2008

Web:
BUG: TreeView Problems with CheckBoxes After setting the Treeview control's Checkbox's property to True, selecting the CheckBox on a child node can return the incorrect state of the CheckBox.
How to add CheckBox in TreeView Control Using ASP.Net 2.0 - .Net ... TreeView control also allows you to display CheckBox either on Parent node or on Leaf Node or to all .... I want how to add checkboxes in treeview control ...
CodeProject: Working with Checkboxes in the WPF TreeView. Free ... Aug 1, 2008 ... This is a tricky problem: we cannot let the CheckBox ever have input focus ..... I've never had to create a treeview with checkboxes before, ...
ASP.NET TreeView and Checkboxes Aug 11, 2008 ... One of the most popular problem is using checkboxes in TreeView. Despite the fact that you can enable checkboxes by setting ...
Problems with Checkbox in TreeView - ASP.NET Forums Each function/sub-function/test-case has a check box adjacent ... Also, is treeview the best approach for this problem or using panels would ...

Adding checkbox to the treeview - microsoft_downloads ... Adding checkbox to the treeview, > ROOT > NEWSGROUP > Asp.Net Forum ... treeview adapter selectedvalue problem ...
Asp.Net 2.0 Treeview - How to AutoPostback when a TreeNode's ... tagName == "INPUT" && o.type == "checkbox") { __doPostBack("",""); } } ... I was facing this same problem of treeview. ...
Treeview Checkbox PostBack issue - microsoft_downloads ... Treeview Checkbox PostBack issue, > ROOT > NEWSGROUP > Asp.Net Forum ... I found a problem with the checkbox checked status when used in ...
TreeView adapter problem - microsoft_downloads ... TreeView adapter problem, > ROOT > NEWSGROUP > Asp.Net Forum ... Check any of the 3 checkboxes and hit the button to submit the form. ...
TreeView Checkbox - ng.asp-net-forum.internet_explorer_web_controls TreeView Checkbox, > ROOT > NEWSGROUP > Asp.Net Forum ... treeview display problems .. nodes not aligned ยท problem with binding 1000+ nodes ...

Videos:
Customized rad treeview control with checkboxes Handling a role permission matrix using telerik rad treeview control with customized checkboxes table






treeview nodes change there color when losing focus

custom node in tree view control

toobar button invisible at runtime

ie web controls with framework v1.0.3705

adding webcontrols to visual studio 2002 toolbox

microsoft.web.ui.webcontrols.dll

how to tell if a tab is selected in a tabstrip

adding nodes to treeview programatically

problem with rendering of tabstrip in updatepanel, which will be load on async postbak...

treeview and multipage problem

can i install the new web controls on my local machine

tabstrip state error

multipage event handling

treeview newbie questions

webctrl_client folder inetpub/wwwroot..is there anyother way?

ie webcontrol, tool tip for every node in the treeview

asp.net site for all browsers

installing treeview control on server 2003

treeview fails over the internet with .net 1.1

installation problem !

404 errors in log file from using treeview

multipage/tabstrip dynamic usercontrol dilemma

tabstrip, multipage and windows 2000 server

why my iewebcontrols.msi can't be installed

disabling node expansion

tabstrip borders

treeview does not show a tree, just plain string of text

microsoft.web.ui.webcontrols.dll not generated

persist multipage pageview contents?

treeview ie web control

   
  Privacy | Contact Us
All Times Are GMT