1

Hi I want to select country from ListBox and display this country data into data grid from database. What I'm doing wrong?

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();
4

0 回答 0