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
985
Conditionally filling a column
posted

I have a column in a band in a WHDG that is bound to a boolean field. When the value of the boolean is true I want to show one image and when the value of the boolean is false I want to show no image or another image.

Is this possible with WHDG?

Parents
  • 33839
    Suggested Answer
    posted

    Hi dvanmil,

    This would be accomplished the same way it is done in the WebDataGrid.  There are three options.  You can handle initialize row event and then set the text of the cell to an <img /> tag and turn HtmlEncode off for that column.  You could make the field a template column and conditionally set the image src based upon that value.  Or you could use the format field off of that column.  And coming in 11.1, there will be a bound check box field.  And you could actually set a custom image for checked/unchecked (true/false).  One of these should get you going.

    regards,

    David Young

Reply Children