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
530
Image in group by row?
posted

I have an existing grid that groups by Product, then Contact, followed by detail rows.

I've been asked to display a note icon next to the contact name if that person's contact record has anything in the notes field.  Seems simple enough, but I'm since this is a GroupByRow rather than a regular row I'm not sure if I can.  Is there a way to add an unbound column to groupby rows so that I can conditionally show an image?

  • 12480
    Offline posted

    Hello,

    You can accomplish this by setting the Image property on the GroupByRow's appearance object. Here's an example of how your code might look:

    private void ultraGrid1_InitializeGroupByRow(object sender, Infragistics.Win.UltraWinGrid.InitializeGroupByRowEventArgs e)
    {
       if (CheckContactRecord(e.Row))
       {
          e.Row.Appearance.Image = new Bitmap(imagePath);
       }
    }

    Please try this out and let me know whether it works for you.