Ultragrid column not displaying as drop down
New DiscussionI have 2 grids on two separate forms. Both are bound to the same type. I have a helper method that configures a column to be a drop down.
It works in one grid and not the other.
The column in the grid where it is not working is clearly binding to the data in the data source because the values are correct. It is just not showing as a drop down.
If I add an unbound column to the grid and configure it as a drop down the code works (see below):
const string TEST_VALUE = "DropdownTest";
ValueList vl = null;
if(!Grid.DisplayLayout.ValueLists.Exists(TEST_VALUE))
{
vl = Grid.DisplayLayout.ValueLists.Add(TEST_VALUE);
vl.ValueListItems.Add("Red");
vl.ValueListItems.Add("Green");
vl.ValueListItems.Add("Blue");
}
if(!columns.Exists(TEST_VALUE))
{
UltraGridColumn dropdown = columns.Add(TEST_VALUE);
dropdown.ValueList = vl;
dropdown.CellActivation = Activation.AllowEdit;
dropdown.CellClickAction = CellClickAction.Edit;
dropdown.Style = ColumnStyle.DropDownList;
dropdown.Header.Caption = "Lol whut?";
}
What could possibly be interfering with displaying the drop down for this column? I feel like I have checked everything…
Sign In
to post a reply
Replies
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Favorites
0 Replies
6 Created On
Mar 26, 2019 Last Post
7 years ago