Hi, guys -
I've got a grid with three bands in it, only a handful of columns are dropdowns. I'm setting up each appropriate column this way:
Grid.DisplayLayout.Bands("Band").Columns("Col").Style = ColumnStyle.DropDown
and also
Grid.DisplayLayout.Bands("Band").Columns("Col").ButtonDisplayStyle = ButtonDisplayStyle.Always
And yet, somehow, there are never any buttons displayed until you activate the row - sometimes they will show up when you mouse over it.
We'd like them to be visible, well, always.
Suggestions? Need more info?
Thanks,
Rob
Hi, Mike, Bunty -
Mike, you set me in the right direction. It'd been a while since I worked in this grid.
It turns out the cells in question, while intended to be dropdowns, had no valuelists assigned - instead they were hosting an UltraTextEditor control with its OWN button, which when clicked would open a tab control containing trees etc etc... rather convoluted.
AND it turns out that the text editor controls weren't actually assigned to the cells in the designer - it was happening in the AfterRowActivate handler.
So the reason that the dropdown buttons weren't showing up is that, as far as the row/cell knew (until activated) there was nothing to be dropped down. (Duh.)
I assigned the appropriate text editor controls to the appropriate columns in the grid designer, and I'm seeing buttons again.
Thanks everyone for their help,
Bunty_Mishra said:However, when you have UltraCombo, ValueList and other as dropdown or DropdownList, the Dropdown button will only be visible when you hover the cell or get into the edit mode. I hope this will clear.
This is not correct. The ButtonDisplayStyle property applies to all buttons in a cell. This includes when the column style is Button, but is also includes DropDown buttons or editor buttons.
If it's not working, my guess is that something is overwriting the ButtonDisplayStyle property after you set it. Like maybe you are loading a layout or a Preset into your grid.
Try checking the value of the property at run-time in a button click event or something just to make sure it's still set to what you set it to.
Also... I assume you are attaching a ValueList to the column. Otherwise, the DropDown Style will not have any effect, since there will be nothing to drop down. In fact, you really don't need to set the Column Style. If you simply attach a ValueList to the column, it will automatically default to DropDown Style.
Rob,I want to say that you can use the ButtonDisplayStyle property of the column when you have taken Column style as Button and it will not work with DropDown or DropDownList.For more information you can refer following lines:"ButtonDisplayStyle property off the column dictates when the buttons in cells of that column are displayed. By default buttons are displayed whenever the user moves mouse over the cell. You can set this property to Always to make the UltraGrid always display the buttons. Buttons inlcude drop down arrow buttons as well as edit buttons and regular buttons."You should have following code to display cell button always:ultraGrid1.DisplayLayout.Bands[0].Columns[0].ButtonDisplayStyle = ButtonDisplayStyle.Always;ultraGrid1.DisplayLayout.Bands[0].Columns[0].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Button;However, when you have UltraCombo, ValueList and other as dropdown or DropdownList, the Dropdown button will only be visible when you hover the cell or get into the edit mode. I hope this will clear. Bunty :)
Hi, Bunty -
I don't understand. I can't find "CellStyle" anywhere, but there is a CellDisplayStyle which doesn't have any reference to Buttons at all.
Can you be more specific maybe?
Thanks again,
Rob,
The property (ButtonDisplayStyle) which you are using works with Cell Style which is being set as Button to show button always. I do not think with Wincombo it works. Incase if you are using ValueList as DropDown, it will not show the DropDown button until you not enter into the edit mode.
Bunty :)