Completed
Last Updated: 14 Feb 2017 14:13 by ADMIN
ADMIN
Dess | Tech Support Engineer, Principal
Created on: 27 Jul 2016 05:20
Category: GridView
Type: Bug Report
3
FIX. RadGridView - the CellValueChanged event is fired although the null cell value is not changed
To reproduce:

 private void Form1_Load(object sender, EventArgs e)
 { 
     this.productsTableAdapter.Fill(this.nwindDataSet.Products); 
     this.categoriesTableAdapter.Fill(this.nwindDataSet.Categories);

     this.radGridView1.AutoGenerateColumns = false;
     this.radGridView1.DataSource = this.productsBindingSource;
   
     GridViewComboBoxColumn col = new GridViewComboBoxColumn();
     col.DataSource = this.categoriesBindingSource;
     col.MinWidth = 200;
     col.DisplayMember = "Description";
     col.ValueMember = "CategoryID";
     this.radGridView1.Columns.Add(col);

     this.radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
     this.radGridView1.CellValueChanged += radGridView1_CellValueChanged;
 }

private void radGridView1_CellValueChanged(object sender, GridViewCellEventArgs e)
{
    string value = "{nothing}";

    if (e.Value != null)
    {
        value = Convert.ToString(e.Value);
    }
    RadMessageBox.Show("CellValueChanged. Value >> " + value);
}

Note: if the cell value is not null, the CellValueChanged event is not fired when the selection in drop down is not changed.
Additional scenario: if you use a RadMultiColumnComboBoxElement for this column replaced in the EditorRequired, the issue is reproducible again.
0 comments