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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...