Jump to content

Change background color of Selected Rows.


abhimanyu

Recommended Posts

Hi

 

For ALL UniDBGrids

 

Add this to customCSS

.x-grid-row-selected .x-grid-cell-inner {
  font-weight: bold;
  background-color:green;
}

For spesific UniDBGrid use this code:

 

OnCreate event of Form

  Grid.JSInterface.JSCallGlobal('Ext.util.CSS.createStyleSheet', ['#'+Grid.JSName+'_id .x-grid-row-selected .x-grid-cell-inner {  font-weight: bold;  background-color:blue;  color: white;}', Grid.JSName+'_css' ]);

OnDestroy event of Form

Grid.JSInterface.JSCallGlobal('Ext.util.CSS.removeStyleSheet', [ Grid.JSName+'_css' ]);
  • Upvote 1
Link to comment
Share on other sites

  • 1 year later...
On 3/22/2017 at 3:26 PM, Hayri ASLAN said:

Hi

 

For ALL UniDBGrids

 

Add this to customCSS


.x-grid-row-selected .x-grid-cell-inner {
  font-weight: bold;
  background-color:green;
}

For spesific UniDBGrid use this code:

 

OnCreate event of Form


  Grid.JSInterface.JSCallGlobal('Ext.util.CSS.createStyleSheet', ['#'+Grid.JSName+'_id .x-grid-row-selected .x-grid-cell-inner {  font-weight: bold;  background-color:blue;  color: white;}', Grid.JSName+'_css' ]);

OnDestroy event of Form


Grid.JSInterface.JSCallGlobal('Ext.util.CSS.removeStyleSheet', [ Grid.JSName+'_css' ]);

Great Work Hayri, It works like  Magic,   thanks :biggrin:

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...