how can i select all checkboxes by clicking a button or checking another checkbox

hi,

i hv this DGV with checkboxcolumn inside it. How can i check(select) all the rows by just clicking a button or checking a checkbox. tq.


Answer this question

how can i select all checkboxes by clicking a button or checking another checkbox

  • MikeCade

    finally, there is way to do this.

  • jarrods

    it's not working man...when set .selected = true, instead of checking all checkboxes, it will select all rows but not the checkboxes.

    2nd prob: how to uncheck those checkboxes that have been ticked after a button click event. Similar to uncheck all checkboxes.

  • Milind Vengurlekar

    use a foreach loop to iterate thru the dgv rows. then set .Selected = true;

  • how can i select all checkboxes by clicking a button or checking another checkbox