Harry Rogers Posted October 3, 2017 Share Posted October 3, 2017 I'm displaying images from a table in a dbgrid When the user clicks a row I want to draw a border around the selected row rather than colour the whole row as dgRowSelect does. How to achieve this? Thanks Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted October 3, 2017 Share Posted October 3, 2017 Hi, Try This (do not forget set options.dgrowselect:=True) Call this onCreate UniDBGrid1.JSInterface.JSCallGlobal( 'Ext.util.CSS.createStyleSheet', ['#' + UniDBGrid1.JSName + '_id .x-grid-row-selected .x-grid-cell-inner { border-style: solid; border-width: 5px;}', UniDBGrid1.JSName + '_css']); And this onClose UniDBGrid1.JSInterface.JSCallGlobal( 'Ext.util.CSS.removeStyleSheet', [UniDBGrid1.JSName + '_css']); Link to comment Share on other sites More sharing options...
Harry Rogers Posted October 4, 2017 Author Share Posted October 4, 2017 Many thanks Hayri That puts a border round each cell of the selected row - but it still colors each selected row as well, is there a way to not shade the row ? Cheers Link to comment Share on other sites More sharing options...
Harry Rogers Posted October 4, 2017 Author Share Posted October 4, 2017 Solved Not to worry,setting background color as part of the same style sheet entry - found it in the Sencha docs - I have ended up with this : Many thanks for your help - all the best UniDBGrid1.JSInterface.JSCallGlobal( 'Ext.util.CSS.createStyleSheet', ['#' + UniDBGrid1.JSName + '_id .x-grid-row-selected .x-grid-cell-inner { border-style: solid; border-width: 1px; background-color: white;}', UniDBGrid1.JSName + '_css]); Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now