Click here to Skip to main content
15,886,639 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi friends,
In window load, i create a datagrid view with checkbox and textbox column.

private System.Windows.Forms.DataGridViewTextBoxColumn colText = new DataGridViewTextBoxColumn();
private System.Windows.Forms.DataGridViewCheckBoxColumn colCheckBox = new DataGridViewCheckBoxColumn();


dataGridView1.Columns.AddRange(new DataGridViewColumn[] { colCheckBox, colText });
           colCheckBox.HeaderText = "Check";
           colText.HeaderText = "Amount";


string cnd = "select name from fees_master";
          MySqlDataAdapter da = new MySqlDataAdapter(cnd, connection);
          connection.Open();
          DataSet ds = new DataSet();
          da.Fill(ds, "course_master");
          dataGridView1.DataSource = ds.Tables["course_master"];
          connection.Close();


Its work correctly. but now i want to insert the mysql data in datagridview textbox column and check box check change. is any way is there?.

thanks in advance.
Posted

1 solution

I guess you want to have some logic on textbox column text change or checkbox column checked change event.

If it is so then you can use DataGrid__CellValueChanged event.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900