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
221
ValueList with images as dropdown in grid
posted

I'm experiencing some problems with ValueLists and images...

 

When I have a ValueList containing strings for both Text and Value, and a column string DataType everything works fine. The grid shows a dropdown control and I can select values from the ValueList. However, I want to show images instead of text in the grid. Thus the column DataType is Image, the ValueList is filled with images for Value and strings for Text. The problem is now that the grid no longer shows a dropdown (not even the dropdown button) for the column's cells. It acts just like a plain non-editable cell. Even if I manually specify Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownList it doesn't work. With breakpoints I can clearly see the ValueList is correctly set and assigned to the column. It just won't appear as a dropdown...

 

It's as if the Image DataType blocks AllowEdit on the cells so the dropdown doesn't show.

 

Any solutions? Workarounds? ...

 

- Visual Studio 2005 SP1 

- Infragistics .NET Advantage 2007.3 + hotfixes

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi Marc,

    MarcCluyts said:
    Thus the column DataType is Image, the ValueList is filled with images for Value and strings for Text.

    Isn't this backward? In order for this to work, the Value in the grid would have to be some non-image value and the DisplayText (which is what's displayed to the user) would be an image.

    It seems to me that if the DataType of the column is an image, then you don't need to use DataValue and DiplayText of the ValueListItems at all. You could just use the DataValue and make it an image. Why would you need to translate this into text - unless the Value is the text and the DisplayText is the image.

    So the question is, what exactly do you want the cell value to be? Do you want to actually store the image as the Value? Or do you need to store some ID like a string or a number and then just display an image to the user based on that ID?  

Children