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

GridViewComboBoxColumn value after selection becomes empty

1 Answer 70 Views
GridView
This is a migrated thread and some comments may be shown as answers.
prabhat tripathi
Top achievements
Rank 1
prabhat tripathi asked on 13 Oct 2009, 05:12 AM

I am using editable RAD grid view to bind some POCO and it has a GridViewComboBoxColumn as defined below

this

 

.gvTargetSelection.MasterGridViewTemplate.AutoGenerateColumns = false;

 

 

GridViewComboBoxColumn gvcbc = new GridViewComboBoxColumn("Priority");

 

gvcbc.DataSource =

new string[] { TargetGroupPriority.NiceToHave.ToString("g"), TargetGroupPriority.MustHave.ToString("g") };

 

gvcbc.DropDownStyle =

RadDropDownStyle.DropDownList;

 

gvcbc.Width = 100;

gvcbc.ReadOnly =

false;

 

gvcbc.ValueMember =

"Priority";

 

gvcbc.HeaderText =

"Priority";

 

gvcbc.FieldName =

"Priority";

 

 

this.gvTargetSelection.Columns.Add(gvcbc);

When the control renders, data is populated and which when double clicked exposes the combo box column with above two values [As shown in code above, data source.]

However when I select any value there and move mouse of the control, no longer anything is selected and cell is empty. If you double click again on the cell, data is there.

Am I missing here setting some default property etc ?

 

1 Answer, 1 is accepted

Sort by
0
prabhat tripathi
Top achievements
Rank 1
answered on 13 Oct 2009, 05:31 AM

//gvcbc.ValueMember = "Priority";

Commenting out the above lines seems to solve it. Thanx a lot.

Tags
GridView
Asked by
prabhat tripathi
Top achievements
Rank 1
Answers by
prabhat tripathi
Top achievements
Rank 1
Share this question
or