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
412
Merge Cells on Hidden Text
posted

I have a column with id's in them and I need to group by this column.  What I would like to do is put a background image in the cells in this column and then hide the text (id).  So the order of events in my head is 1-Load Grid, 2-Merge cells based on values, 3-Replace cell text with background image.

 

On the IntializeLayout event I have:

e.Layout.Bands(0).Columns.FromKey("ServiceId").MergeCells = True

On the InitializeRow event I have the following, but with this I get undesired results due to the merging of all cells in the column b/c .Value = Nothing

        With e.Row.Cells
            'Set ServiceId column to picture
            .FromKey("ServiceId").Style.CustomRules = "Background-repeat:no-repeat"
            .FromKey("ServiceId").Style.BackgroundImage = "phone.png"
            .FromKey("ServiceId").Style.HorizontalAlign = HorizontalAlign.Center
            .FromKey("ServiceId").Style.VerticalAlign = VerticalAlign.Middle
            .FromKey("ServiceId").Value = Nothing
        End With

 

I really appreciate any ideas you might have.

-Andy