您好我想从ListBox
中选择国家/地区,并将此国家/地区数据显示在数据库的数据网格中。
我做错了什么?
OpenResult();
var selectedColumns = from SqlCeUpdatableRecord stulpelis in sqlResultSet
where stulpelis["Ship Country"] = listBox1.SelectedItem
select new
{
ShipName = stulpelis["Ship Name"],
ShipPostalCode = stulpelis["Ship Postal Code"],
ShipCountry = stulpelis["Ship Country"]
};
dataGrid1.DataSource = selectedColumns.ToList();
dataGrid1.Update();