private void LoadTourDetailGridView(IList <TourDetail> arr) { TblSelectClass tblTourDetail = new TblSelectClass(_locations, arr); this.gridViewTourDetail.DataSource = tblTourDetail; this.gridViewTourDetail.ClearSelection(); this.SetUpTourDetailGridView(); }
private void LoadLocations() { var table = new TblSelectClass(_locationsAvailable.Cast <SelectClass>().ToList(), true); this.listLocation.DataSource = table; this.listLocation.DisplayMember = "Name"; this.listLocation.ValueMember = "Id"; this.listLocation.SelectedIndex = 0; }
private void LoadGridView(int selectedIndex = -1) { TblSelectClass table = new TblSelectClass(_arr.Cast <SelectClass>().ToList()); this.gridView.DataSource = table; if (selectedIndex < 0) { this.gridView.ClearSelection(); } else { this.gridView.Rows[selectedIndex].Selected = true; } }