Jqxgrid selected row colour


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

.jqx-grid-cell-selected {

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


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.


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

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


Can this be translated in NSB?


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

  (some code in JavaScript)
End JavaScript

Thank you, that’s got it.