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
750
Valuelist not displaying value instead of text
posted

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 = vList
vList.ValueListItems.Add(0, " ")
vList.ValueListItems.Add(1, "R")
vList.ValueListItems.Add(2, "T")
gridApps.DisplayLayout.Bands(0).Columns(4).ValueList = vList
gridApps.DisplayLayout.Bands(0).Columns(4).ValueList.DisplayStyle =
  Infragistics.WebUI.UltraWebGrid.
  ValueListDisplayStyle.DisplayText

 

 

Parents
  • 3732
    posted

    Hello,

    This code should work. I was wondering about the data type of the column. What kind of data is displayed in the column? When the cell goes into edit mode, then the text field of the ValueList is displayed in the dropdown. When one of the option from the dropdown is selected it overwrites the text presented in the cell. The AllowUpdate property for this column needs to be set to true in order to do this. Please include these following lines of code after populating the ValueList:

    UltraWebGrid1.Columns(4).AllowUpdate = Infragistics.WebUI.UltraWebGrid.AllowUpdate.Yes

    UltraWebGrid1.Columns(4).Type = Infragistics.WebUI.UltraWebGrid.ColumnType.DropDownList

    UltraWebGrid1.Columns(4).ValueList = vList

    Let me know if you get any issues with this.

    Thanks

Reply Children