This is a migrated thread and some comments may be shown as answers.

GridViewComboBoxColumn not persisting values

1 Answer 135 Views
GridView
This is a migrated thread and some comments may be shown as answers.
manu
Top achievements
Rank 1
manu asked on 14 Sep 2010, 06:46 PM
Dear All,

 I'm strugling with one problem in GridViewComboBoxColumn

I have one Combo Box cell in my RadGridView and I created one Data Table object and set it as dataset for the Combo Box set .

When I’m entering into the cell, the first value in the datatable is appearing in the grid automatically and it is not updating that value.

Please check the cod below

public Form1()
      {
          InitializeComponent();       
           
          this.radGridView1.Rows.AddNew();
      }
      void SetItems()
      {
          DataTable logicalOps = new DataTable();
          logicalOps.Columns.Add("Col1");
          logicalOps.Columns.Add("Col2");
           
          logicalOps.Rows.Add("=", "Equal to");
          logicalOps.Rows.Add("<>", "Not equal to");
          logicalOps.Rows.Add(">", "Greater than");
          logicalOps.Rows.Add(">=", "Greater than equal to");
          logicalOps.Rows.Add("<", "Less than");
          logicalOps.Rows.Add("<=", "Less than equal to");
          logicalOps.Rows.Add("START", "Start With");
          logicalOps.Rows.Add("END", "End With");
          logicalOps.Rows.Add("CONTAINS", "Contains");
          logicalOps.Rows.Add("IS NULL", "IS NULL");
          GridViewComboBoxColumn ctrl = (this.radGridView1.Columns[0] as GridViewComboBoxColumn);          
          ctrl.FieldName = "Col2";
          ctrl.DataSource = logicalOps;
          ctrl.DisplayMember = "Col2";
          ctrl.ValueMember = "Col1";
            
             
      }
Here, as I said when the first cell is in edit mode it will show "Equal to" automatically but it will never update the cell,
one more problem is when I select  a value the the default value will be previously selected value and it will not allow to update
with the same value

Please Help .

Thanks in Advance,

Manu Krishna

Here, as I said when the first cell is in edit mode it will show "" automatically but it will never update the cell,one more problem is when I select  a value the the default value will be previously selected value and it will not allow to update with the same valuePlease Help .Thanks in Advance,Manu Krishna

1 Answer, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 17 Sep 2010, 05:55 PM
Hello manu,

We addressed this issue in our latest service pack - Q2 2010 SP2. I recommend that you try it and we will appreciate your feedback. In case you have further questions, please contact me.

All the best, Jack
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
manu
Top achievements
Rank 1
Answers by
Jack
Telerik team
Share this question
or