Hello .. any help with this is appreciated. I am using 8.2. I added a valuelist to a column in the designer but it was displaying the value instead of the text, so I removed it and used the following code from a knowledge base article. Still it is displaying the number instead of the letter until I click on it to edit.
Dim vList As New Infragistics.WebUI.UltraWebGrid.ValueList()gridApps.Columns(4).ValueList = vListvList.ValueListItems.Add(0, " ")vList.ValueListItems.Add(1, "R")vList.ValueListItems.Add(2, "T")gridApps.DisplayLayout.Bands(0).Columns(4).ValueList = vListgridApps.DisplayLayout.Bands(0).Columns(4).ValueList.DisplayStyle = Infragistics.WebUI.UltraWebGrid. ValueListDisplayStyle.DisplayText
Hi Folks,
Do you know if the ValueList feature is still available on the new version of WebDataGrid and WebHierarchicalDataGrid Controls (11.2.20112.2025)?
If not, what functionality has replaced it? Or how should a similar solution be implemented?
Thanks,
Victor
For future readers, the value display was not working because the grid thought the column type was String, bu that the Id type of the ValueList was integer...Making both types the same (Integer in this case) fixed up the issue.
That works pretty good .. thanks, I'm going to do that. I still think the other should work.
Hi,
I am joining this thread too late. But following is my approach which I generally use when I want to bind value list for any column.
I just populate a DataTable from my primary table of my value list reference column. Later I bind that table with value list of the column and set DisplayMember and ValueMember properties.
This is very simple and logical because we always need reference value from some primary data base table.
I have tested the sample with following code. The in actual program dt should be filled from primary table from database.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim dt As DataTable
dt = New DataTable()
dt.Columns.Add("Byte", GetType(Byte))
dt.Columns.Add("Txt", GetType(String))
Dim dr As DataRow
dr = dt.NewRow()
dr(0) = 4
dr(1) = " "
dt.Rows.Add(dr)
dr(0) = 1
dr(1) = "A"
'Similarly add rows for B,C,D....
'dt should be filled with data from primary table
grid1.Columns(2).AllowUpdate = Infragistics.WebUI.UltraWebGrid.AllowUpdate.Yes
grid1.Columns(2).Type = Infragistics.WebUI.UltraWebGrid.ColumnType.DropDownList
grid1.Columns(2).ValueList.DataSource = dt
grid1.Columns(2).ValueList.DisplayMember = "Txt"
grid1.Columns(2).ValueList.ValueMember = "Byte"
grid1.Columns(2).ValueList.DataBind()
End Sub
I'm wondering why the InitializeRow event is getting fired twice? I didn't get a chance to look at the second sample you've attached here. However, to work around the issue you are having with comparing the cell values, you can include a hidden column where the values (0,1,2 etc) are stored and depending on these values you can populate the visible column with text ('R','T' etc). The ValueList should be embedded to the visible column.
I'll give you my feedback on the code as soon as I get a chance.
Thanks