TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
ramesh s
NA
116
9.3k
Checkboxlist deselect item
Nov 10 2017 7:47 AM
Hi All,
I have populating checkboxlist with database at runtime, it contains Group/Sub Group items. When selected Group item Sub Group item also to be select. Group and Sub Group items have first 7 characters are similar, using below logic it is working .
string vals = "";
string val = "";
foreach(Listitem item in chklist.items)
{
if (item.Selected)
{
if(Group)
{
vals += strGroup;
}
}
}
foreach(Listitem item in chklist.items)
{
if(SubGroup)
{
val= item.value;
if (val.Contains(vals)
{
item.selected = true;
}
}
}
As per requirement user also can deselect Sub Group. with the above logic always subgroup is selected if group selected. Please suggest me even group selected sub group able deselect it.
Thanks
Reply
Answers (
1
)
How to get specified user name records in grid view ASP.net
i want gridview coloumn show as row with image