Hello,
I am using checkbox in DatagirdColumn. I need checked chechbox rows for further process.How do I achieve this?
Thank you!
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
Amit GuptaRank #190 · 12.8K reputationPosted Oct 19, 2016, 2:15 AM EDT
Milan Prajapati107 reputationPosted Oct 19, 2016, 2:15 AM EDT
var SelectedList=new List(); for (int i = 0; i < MyDataGrid.Items.Count; i++) { var item = MyDataGrid.Items[i]; var mycheckbox = MyDataGrid.Columns[1].GetCellContent(item) as CheckBox; if ((bool)mycheckbox.IsChecked) { SelectedList.Add(YourDataGridItemsList[i]); } }Praveen Gopal101 reputationPosted Nov 17, 2016, 3:30 AM EST