コード例 #1
0
 public ControlManageCompetitions()
 {
     InitializeComponent();
     gridCompetitions.SelectionChanged += GridCompetitions_SelectionChanged;
     SelectedItem = null;
     Competitions = new BindingList <CompetitionGrid>();
     LoadInfo();
 }
コード例 #2
0
 private void GridCompetitions_SelectionChanged(object sender, EventArgs e)
 {
     if (gridCompetitions.SelectedRows.Count > 0)
     {
         SelectedItem   = (CompetitionGrid)gridCompetitions.SelectedRows[0].DataBoundItem;
         tbName.Text    = SelectedItem.Name;
         dpStart.Value  = SelectedItem.StartDate;
         dpEnd.Value    = SelectedItem.EndDate;
         tbDetails.Text = SelectedItem.Details;
     }
 }