Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
762
Cannot populate UltraWinGrid with DropDownList
posted

I am trying to create a WinForm that contains an UltraWinGrid that will contain rows of provisions. Each row contains critera for a provision (which printer, which paper size, et al.) Each criterion is a single selection from a list of possible selections (e.g. Printer1, Printer2, etc.). The possible selections are only known at runtime, so to select one I plan to create a ValueList of possibilities for each column, define each UltraWinGrid Band.Column.Style as a DropDownList, and assign the column.ValueList at runtime. A possible provisioning is:

Printer1    8x11     Bond
Printer2    11x16    Bond

The selections available for all rows are the same, only the selection value for each row can be different. The value of each cell in the DataSource is an integer; I populate the ValueList with integer IDs and string DisplayText and want the DropDownList to display the text of the associated ID. Each row should be different, but let's not worry about that yet.

A screen shot of the UltraGrid properties follows:

WinGrid design screen shot

(The editor removed my picture. It is available at http://tinypic.com/r/33o6xwg/6)

I cannot get this to work; trying to set the ValueList with:

ugAutoHold.DisplayLayout.Bands[0].Columns["Printer"].ValueList = targetPrinters;

Throws a null reference exception because ugAutoHold.DisplayLayout.Bands[0].Columns is always empty.

I have read http://es.infragistics.com/community/forums/t/67869.aspxbut cannot use that as my ValueLists are not know until runtime.

Parents Reply Children
No Data