private void allocation_request_SelectionChanged(object sender, SelectionChangedEventArgs e) { try { toSiteID = values.Rows[allocation_request.SelectedIndex][3].ToString(); eqAll = DBManager.SelectEquipmentForAlocation(values.Rows[allocation_request.SelectedIndex][1].ToString(), toSiteID); equipment_list.ItemsSource = eqAll.AsDataView(); selected_allocation_id = values.Rows[allocation_request.SelectedIndex][0].ToString(); } catch { } }