private void ExpandLeagueTableForm_Load(object sender, EventArgs e)
        {
            this.dataGridViewLeaguesExpand.Columns["LeagueId3"].Visible    = false;
            this.dataGridViewLeaguesExpand.Columns["TeamId2"].Visible      = false;
            this.dataGridViewLeaguesExpand.Columns["LeagueName2"].Visible  = false;
            this.dataGridViewLeaguesExpand.Columns["CountryName2"].Visible = false;



            CompetitionInfo info       = new CompetitionInfo();
            string          LeagueName = Competitions.LeagueId;

            bindingSource.DataSource             = _competitionsRepository.GetCompetitonsInfo(LeagueName);
            dataGridViewLeaguesExpand.DataSource = bindingSource;

            dataGridViewLeaguesExpand.ColumnHeadersDefaultCellStyle.BackColor = Color.Black;
            dataGridViewLeaguesExpand.EnableHeadersVisualStyles = false;

            DataGridViewImageColumn Button = new DataGridViewImageColumn();

            Button.Image        = Image.FromFile(@"C:\Users\38599\Documents\Morningstar\Faks\2. godina\.NET\FootballData\seemore.png");
            Button.Width        = 20;
            Button.AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
            Button.Name         = "See more";
            dataGridViewLeaguesExpand.Columns.Add(Button);
            dataGridViewLeaguesExpand.AutoGenerateColumns = false;

            lblLeagueName.Text  = Competitions.LeagueId;
            lblCountryName.Text = Competitions.lblCountryName;
        }
예제 #2
0
        private void textBoxSearch_TextChanged(object sender, EventArgs e)
        {
            string                 clubName   = textBoxSearch.Text;
            CompetitionInfo        info       = new CompetitionInfo();
            string                 LeagueName = Competitions.LeagueId;
            var                    clubs      = _competitionsRepository.GetCompetitonsInfo(LeagueName);
            List <CompetitionInfo> clubNames  = clubs.Where(xx => xx.clubName.ToLower().Contains(clubName.ToLower())).ToList();

            tableBindingSource.DataSource  = clubNames;
            dataGridViewLeagues.DataSource = tableBindingSource;
        }