hi sir,
How to get checked checkedListbox items in datagridview in asp.net5 c#?
please help me.
CheckedListbox items in datagridview
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Lakshmanan Sethu SankaranarayanRank #124 · 17.7K reputationPosted Mar 21, 2014, 1:01 AM EDT
Brijendra GautamRank #1,900 · 778 reputationPosted Mar 21, 2014, 1:24 AM EDT
Are you talking about the CheckBoxList control in gridview row then the solution is below:
foreach(GridViewRow gr in gridview1.Rows){
CheckBoxList cbx = (CheckBoxList) gr.FindControl("
foreach(ListItem cbk in cbx.Items){
if(cbk.Selected){
// Do your work here
}
}
}
Since CheckBoxList has multiple selection option, so you need for loop to get all the selection. SelectedItem property of list will give only first item.