Add an image/icon in the header column of Data Grid 2

0
Hi All, I’m using a Data Grid 2 to bind my data but have one small issue. I want to add an image/icon in the header column of Data Grid 2 (refer to Image 1 highlighted area) just like Image 2 (highlighted area).   Image 1 Image 2 Please provide any alternative method or widget if above is not possible. Thanks, Animesh
asked
2 answers
0

I think there are a couple of things you can try to get this. One of the easiest is placing the image above datagrid 2 and then use styling to place it within the header part of datagrid 2.
I think with css position:absolute you can get there.

Hope this helps!

answered
0

This is not a standard option in the Datagrid2 widget.

Alternative option is to:

- add a classname to the Datagrid2-element;

- add this class to your main.scss (or any more specific .scss-file)

- use ::before to add this image

// Class added to your Datagrid2
.myDatagridWithImage{
    .column-header:first-child::before{
        background-image: url(images/yourimage.gif);
    }
}

 

answered