DataGridView checkbox column RRS feed

  • Question

  • Hi All;


    I'm using a Datagridview with a checkbox column, What LINQ code do I use (and How) to check the datagridview for Items checked and then delete those items from that table and insert them into the Aliastoenter table?


    Thanks in advanced for fast response.



    Tuesday, September 25, 2007 10:53 PM



    If check box column is on cell 2 then

    foreach (DataGridViewRow dgRows in dg.Rows)


       Convert.ToBoolean(dgRows.Cells[2].Value) == true



    collect all the key values from corresponding row and delete the rows from dataset and rebind it with grid

     now the rows will be deleted

    Wednesday, September 26, 2007 7:23 AM