Jump to content

DbGrid selected cell color


arilotta

Recommended Posts

Hi,

I'm using the UniDBGrid OnDrawColumnCell event to colorize cells background

according to a query field value.

I've hidden the selection as explained in this post:

 


 

Therefore, I added these lines to the CustomCSS property:

 

.x-grid-row .x-grid-cell-selected {

  background-color: #FFFFFF !important;

}

.x-panel .x-grid-body {

    border-width: 0

}

 

 

Now, the problem is that when the user selects a cell with a custom background color defined 

in the OnDrawColumnCell event, that color is replaced by the selection color, in my case by 

color white.

Is there a way to have the selected cell use the background color defined in OnDrawColumnCell event ?

 

Thanks

Andrea

 

Link to comment
Share on other sites

Hi,

Also This doesn't hide the selection it just adds custom color to cell/row selected and sets a border width of 0 to the grid body.

.x-grid-row .x-grid-cell-selected {
  background-color: #FFFFFF !important;
}
.x-panel .x-grid-body {
    border-width: 0
}

To hide / prevent grid selection;

 

uniguigrid-->clientevents-->unievents

function beforeInit(sender, config)
{
  sender.disableSelection = true;
}

Mark

  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...