Click here to Skip to main content
15,915,869 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I have a requirement.I have a form which has to be dispaly company name and subcategories will be dispalyed with checkboxes.

when user wants to search his company name then that company name,category will be dispalyed.subcategories also will be displayed with check boxes.

My requirement is already user has posted his company with several subcategories.when user wants to edit his company details all subcategories based on category will be dispalyed with checkboxes.

I am getting checkboxes with subcategorynames my requirement is already selected subcategories will be checked and otheres are unchecked for user understanding.

please help me.

Thanks in Advance.
Posted
Updated 20-Apr-11 20:38pm
v2
Comments
Ankur\m/ 21-Apr-11 2:44am    
Wrong place to give our requirement. We don't write code. Tell us what you have tried and show us "specific" problem and we will be happy to help you.
BTW you can start with Google search, this is a common requirement.

http://forums.asp.net/t/1311324.aspx[^]

I hope the above information will be helpful.
 
Share this answer
 
my requirement is already selected subcategories will be checked and otheres are unchecked for user understanding

Check the sample and work accordingly.
foreach (DataListItem dli in DataList1.Items)
            {
                CheckBox ck = (CheckBox)dli.FindControl("ChkBox");
                Label lbl = (Label)dli.FindControl("Label1");
                {
                 //ChildString is the retrieved value of the checkbox (text here) saved in database.
                    if (ck.Text == ChildString)
                    {
                        ck.Checked = true;
                    }
                    else
                    {//do something.
                    }
                }
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900