Hi, I've added dropdownlist in UltraWinGrid using following code. But for some reason I can't see any data even when I click "drop down list".
After much struggle I could set the value using second code snippet, but still the clicking on drop down do not show any other data that I've added.
Note that the demo code I've have do show data fine. Not sure how to fix this.
Thanks
Code snippet # 1
if (!e.Layout.Bands[0].Columns.Exists("PACKAGE"))
{
e.Layout.Bands[0].Columns.Add("PACKAGE", "UNIT");
e.Layout.Bands[0].Columns["PACKAGE"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownList;
e.Layout.Bands[0].Columns["PACKAGE"].ButtonDisplayStyle = Infragistics.Win.UltraWinGrid.ButtonDisplayStyle.Always;
e.Layout.Bands[0].Columns["PACKAGE"].DataType = typeof(System.String);
e.Layout.Bands[0].Columns["PACKAGE"].Hidden = false;
e.Layout.Bands[0].Columns["PACKAGE"].Width = 10;
}
Hi,
What exactly is happening? Are you able to see the DropDownButton in the cell?
Does anything happen when you click on it?
Are you seeing an empty list? Or no list at all?
My best guess is that the grid is read-only and so the cell cannot enter edit mode.
I can see the column with the value and with dropdown button. The data is also there because I've set the value manually, but when I click on it, drop down list do not show up. I am not setting it to read only, is there a setting I can override ?
After your response, I tried also to set the EditorComponent as below, but still cannot see drop down list at all.
e.Layout.Bands[0].Columns["PACKAGE"].EditorComponent = m_ComboEditor;
There are a number of ways in which you could make the column read-only. One very easy way to test this is to set the Style on the column to DropDown, instead of DropDownList and then try to type into the cell.
If you cannot type into it, then it's read-only.
If you are able to type into the cell, then I'm not sure what's going on there. My only other guess is that some other program or something else in your programming environment is interfering with the ability of the dropdown to drop down.
Are you able to drop down other controls like UltraComboEditor?