Click here to Skip to main content
15,891,431 members

Comments by Member 4425308 (Top 1 by date)

Member 4425308 22-Jun-18 18:52pm View    
string DepPlace = gridView1.GetFocusedRowCellValue("DepPlace").ToString(); //Origin
string ArrPlace = gridView1.GetFocusedRowCellValue("ArrPlace").ToString(); //Destination
connection.Open();
SqlCommand sqlCommand = new SqlCommand("Select *from mapControl1 where DepPlace=@d1", baglanti);
SqlDataAdapter dataAdapter = new SqlDataAdapter(sqlCommand);
sqlCommand.Parameters.AddWithValue("@d1", DepPlace);
DataTable table = new DataTable();
dataAdapter.Fill(table);
gridControl1.DataSource = table;
connection.Close();