hi all
datagridview the first one column is used ,ColumnType:DataGridViewCheckBoxColumn, I now think Achieve pressing the command button select all rows data.
thanks in advance.
Hi aken H,
Could you please explain your question in more detail. I could not get your question properly.
Thanks.
hi all,
//code
/// <summary> /// this method select all datagridview row header, it is used for select all rows /// </summary> private void btnSelectALL_Click(object sender, EventArgs e) { // first column name is "Select",ColumnType:DataGridViewCheckBoxColumn //how write the code }
Hi Awadhendra Tiwari,
yes,this is i want.
// the click command , i want select all Checking of checkbox column
private void btnSelectALL_Click(object sender, EventArgs e) { //how write the code }
thanks
private void button1_Click(object sender, EventArgs e) { List<DataGridViewRow> rows_with_checked_column = new List<DataGridViewRow>(); foreach (DataGridViewRow row in dataGridView1.Rows) { if (Convert.ToBoolean(row.Cells[CheckBoxColumn1.Name].Value) == true) { rows_with_checked_column.Add(row); } } // Do what you want with the check rows Thanks.
hi Awadhendra Tiwari ,
thanks for your answer.
i very appreciate your bolg write article.
thanks.