I am trying to figure out how to add a valuelist to the ultragrid but everything I've found and tried has not worked. I have to be missing something. If someone could step me through each step for just a simple list of a couple of items, I could figure out the rest from there.
Thanks,Kevin
Are you just trying to create a dropdown list in one of the columns in the grid? If that's the case, then here's a small snippet that might help:
-------------------Infragistics.Win.ValueList vl = new Infragistics.Win.ValueList();for (int i = 1; i <= 10; i++){ vl.ValueListItems.Add(i);}
this.ultraGrid1.DisplayLayout.Bands[0].Columns[0].ValueList = vl;this.ultraGrid1.DisplayLayout.Bands[0].Columns[0].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownList;----------------
All this does is create a simple valuelist, adds 10 items to it, associates it with the first column in the top level (band 0) of the grid and sets the style of the column to be a DropDownList. There's also a BindableValueList object in case you just want to bind to a source of data instead of building up the ValueList by hand.
Pretty much, yeah.
But I'm using VB.Net to do this so I modified your code above to look like this:
Dim vl As New Infragistics.Win.ValueList()
Dim i As Integer
For i = 1 To 10
vl.ValueListItems.Add(i)
Next i
UltGrd.DisplayLayout.Bands(0).Columns(1).ValueList = vlUltGrd.DisplayLayout.Bands(0).Columns(1).Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownList
I have this in the form load section of my code but it's not showing anything when I run the project, just a blank ultra grid. What am I missing?
Thanks,
Kevin