Completed
Last Updated: 14 Sep 2015 11:42 by ADMIN
ADMIN
Stefan
Created on: 17 Jul 2013 02:05
Category: GridView
Type: Bug Report
0
FIX. RadGridView - the Columns are not yet initialized in the DataBindingComplete event handler
To reproduce:

  public Form1()
        {
            InitializeComponent();

            Random r = new Random();
            DataTable table = new DataTable("table1");
            table.Columns.Add("ID", typeof(int));
            table.Columns.Add("Name", typeof(string));
            table.Columns.Add("Bool", typeof(bool));
            table.Columns.Add("DateColumn", typeof(DateTime));

            for (int i = 0; i < 10; i++)
            {
                table.Rows.Add(i, "Row " + i, r.Next(10) > 5 ? true : false, DateTime.Now.AddHours(i));
            }

            DataSet dataSet = new DataSet();
            dataSet.Tables.Add(table);

            radGridView1.DataBindingComplete += radGridView1_DataBindingComplete;
            this.radGridView1.DataSource = dataSet;
            this.radGridView1.DataMember = "table1";
        
        }

        void radGridView1_DataBindingComplete(object sender, GridViewBindingCompleteEventArgs e)
        {
            
        }
0 comments