I have an UltraCombo with a DataTable as the datasource. The DataTable has over 10 columns but I only need to show 2 columns in the dropdown. How can I do this without defining each column in the designer and setting it to hidden?
Typically, you would use the InitializeLayout event of the combo. From there, you can access e.Layout.Bands.Columns["my column"].Hidden and set it to true for the columns you want to hide.
I found a property on ultraWinGrid control that give me exactly what I need. If I set the control.DisplayLayout.NewColumnLoadStyle = Hide, it will hide any columns that are in the DataSource but not defined in the columns collection of the control.
Hi William,
There's no way to hide all columns if that's what you are asking. You have to set the Hidden property on each individual column. Of course, you don't have to write 101 lines of code for this, you could simply loop through the column using a for loop.
Is there a way to hide all columns, except one? I have a DataSource that has 100 + columns, and as stated before I would only like to show one column.
I have this code up to the Index of 100.
eucTamano.DisplayLayout.Bands[0].Columns[0].Hidden = true;
..
eucTamano.DisplayLayout.Bands[0].Columns[100].Hidden = true;
Is there a way to hide certains rows/values of a column from an UltraCombo¿? (c#)
Currently I have an UltraCombo box that displays 6 results:
When the user enters the UltraCombo, I would like the values of ELA, DIS and AUSV to hide, making them unavailable for the user.
How can I do this?