private void resultDataGrid_MouseDoubleClick(object sender, MouseButtonEventArgs e) { if (sender != null) { IList rows = resultDataGrid.SelectedItems; Order order = new Order(); DataGridOrder dataGrid = new DataGridOrder(); dataGrid = (DataGridOrder)rows[0]; } }
private void resultDataGrid_MouseDoubleClick(object sender, MouseButtonEventArgs e) { Order order = new Order(); if (sender != null) { IList rows = resultDataGrid.SelectedItems; DataGridOrder dataGrid = new DataGridOrder(); dataGrid = (DataGridOrder)rows[0]; order.orderID = dataGrid.orderID; order.startCityName = dataGrid.startCityName; order.endCityName = dataGrid.endCityName; } //Go to the TripTrackter page UserControl usc = new TripTracker(order); GridMain.Children.Add(usc); }