本文介绍了如何用datagridview值填充组合框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
private void dgridregistration_CellClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex >= 0)
{
DataGridViewRow row = this.dgridregistration.Rows[e.RowIndex];
txtmemfname.Text = row.Cells["fname"].Value.ToString();
txtmemmname.Text = row.Cells["mname"].Value.ToString();
txtmemlname.Text = row.Cells["lname"].Value.ToString();
rchtxtmemaddress.Text = row.Cells["address"].Value.ToString();
cmbmemstate1.Text = row.Cells["state_name"].Value.ToString();
cmbmemcity1.Text = row.Cells["city_name"].Value.ToString();
txtbdate.Text = row.Cells["bdate"].Value.ToString();
txtmempincode.Text = row.Cells["pincode"].Value.ToString();
cmbmemoccupation1.Text = row.Cells["occupation"].Value.ToString();
cmbmembgroup1.Text = row.Cells["blood_id"].Value.ToString();
}
}
这是我的代码,用于使用datagriedview值填充文本框.但是在州和城市中,我想显示存储在表名州和城市"中的其他州和城市的值.
因此,请帮帮我..
This is my code to populate the textboxes with datagriedview values. but in state and city, i want to display the values of other states and cites stored in a table name state and city.
so please help me out..
推荐答案
这篇关于如何用datagridview值填充组合框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!