Jqxgrid selected row colour

Hi,

I am trying to set the colour of a selected jqxgrid row.
The css is as below:

.jqx-grid-cell-selected {
    background-color:blue;
}

I tried to use $("#Grid1 .jqx-grid-cell-selected").css(“background-color”, “blue”) but nothing happens.
Am i doing this wrong?

Thanks

Grid1.cells(r,c).style.backgroundColor = vbblue

Thanks for your reply.

What you’ve shown works for the common grid but not jqxgrid, which is what i am using.

Sorry. Late at night reply. Brain not fully engaged.

Has anyone else had any joy with colouring selected rows using jqxgrid?

This site here has the css code required to achieve this but I cannot make it work in NSB.

Thanks

I came across a response on the jqwidgets forum that says row selection colour can be achieved using:

$('#grid').on('rowselect', function (event) {
 $("#grid").jqxGrid('refresh');
  setTimeout(() => {
     let cells = $(".jqx-grid-cell-selected");
     for (let i in cells) {
         if (i < cells.length) {
             let cell = cells[i];
             cell.style.backgroundColor = 'red';
         }
     }
 },5);

});

Can this be translated in NSB?

Thanks

This code is in JavaScript. AppStudio allows you to embed JavaScript snippets in your BASIC code:

JavaScript
  (some code in JavaScript)
End JavaScript

Thank you, that’s got it.