Discuss anything related to web development but no technical support questions


Post by afiume »

Hi everybody,

can i change change the background record color in eventRenderer?

Example:
eventRenderer: function (event, r, tplData, row, col, ds) {

tplData.cls = 'backgroundRED';
[...]

Image

Thanks and Regards.

Tony

Post by mats »


Post by afiume »

Thanks for the reply.

i tried:
 eventRenderer: function (event, r, tplData, row, col, ds) {

        tplData.style = 'color:red';
but not happend nothing.

I tired:
 eventRenderer: function (event, r, tplData, row, col, ds) {

        tplData.style = 'background-color:red';
but changes the event color. I need to change the background grid color how in my picturein the top post :)
Is possible?

Thanks.

Tony

Post by nickolay »

Do you need it for the whole row?

Post by afiume »

nickolay wrote:Do you need it for the whole row?
yes :)

Post by nickolay »

Then you can use regular "getRowClass" method of the grid view.

Try to configure your scheduler with something like:
normalGridConfig : {
    viewConfig : {
        getRowClass : function () { return 'my-class' }
    }
}

Post by afiume »

nickolay wrote:Then you can use regular "getRowClass" method of the grid view.

Try to configure your scheduler with something like:
normalGridConfig : {
    viewConfig : {
        getRowClass : function () { return 'my-class' }
    }
}
Thanks for the reply :)

i try :)

Post by MaciejHillar »

But if I want add just some style not css class. Is it possible?

Post by mats »

Read above:
eventRenderer: function (event, r, tplData, row, col, ds) {

        tplData.style = 'background-color:red';
Docs: https://www.bryntum.com/docs/gantt-for- ... ntRenderer
:)

Post by MaciejHillar »

ok,
But I want change lockedgrid row not events colour

Post Reply