更新时间:2023-09-20 10:09:04
更新代码并查看结果.
Hi,
Update your code and see the result.
_localdt = new DataTable("GeneralInfo");
_localdt = PersonBLL.GetAddressesFromPerson(textBoxBranchName.Text);
dataGridViewAddresses.DataSource = _localdt.Tables["Addresses"]; //Check it you are getting data into this line.
如果它不起作用,则使用下面的行来绑定数据.
And if it is not working then use below line to bind data.
dataGridViewAddresses.Grid.DataSource = localdt.Tables["Addresses"];
之后
dataGridViewAddresses.DataSource = _localdt.Tables["Addresses"];
dataGridViewAddresses.Refresh();
DataBind();