Phxtecno Posted October 19, 2015 Share Posted October 19, 2015 Hi, I need know how change the font color and style (bold) of a single cell in the currently selected row. Seems possible, but I have no idea about the sintax... Any body can help ? Regards, Marc Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 20, 2015 Share Posted October 20, 2015 Hi, If, a single cell, while try: UniServerModule -> CustomCSS add: .x-grid-cell-selected { font-weight: bold; color: green; } Best regards. Quote Link to comment Share on other sites More sharing options...
Phxtecno Posted October 20, 2015 Author Share Posted October 20, 2015 Thank you mate, I think this will work for all the grid in the application (?) I was looking for a solution in a single Grid, using the Event OnDrawColumnCell... Here is possible change font and color of the cell, but I don't see how make the change on the cell of the selected row only... Marc Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 20, 2015 Share Posted October 20, 2015 I think this will work for all the grid in the application (?) yes Quote Link to comment Share on other sites More sharing options...
Phxtecno Posted October 20, 2015 Author Share Posted October 20, 2015 but there is a way to get the currently selected row in a grid ? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 20, 2015 Share Posted October 20, 2015 I think this will work for all the grid in the application (?) Also, you can use for a particular UniDBGrid: procedure TMainForm.UniFormCreate(Sender: TObject); begin UniSession.SetStyle( '#'+UniDBGrid1.JSName+'_id .x-grid-cell-selected {' + ' font-weight: bold;' + ' color: green;' + '}'); end; Try, Best regards. Quote Link to comment Share on other sites More sharing options...
Phxtecno Posted October 20, 2015 Author Share Posted October 20, 2015 I use Frames, so used the event onCreate of frame, but nothing happens... Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 20, 2015 Share Posted October 20, 2015 Hi, Then you can try this: in the event onCreate of frame add: UniSession.AddJS('Ext.util.CSS.createStyleSheet("'+ '#'+UniDBGrid1.JSName+'_id .x-grid-cell-selected {' + ' font-weight: bold;' + ' color: green;' + '}")'); Best regards. Quote Link to comment Share on other sites More sharing options...
Phxtecno Posted October 22, 2015 Author Share Posted October 22, 2015 Thank you, it works, partially; the color is ok, but do not change to bold style. Anyway I need highlight always the same column of the selected records, even when user click on other fields to select the row. I'll try to study on Sencha docs... Can you point me to useful links to study on ? Regards Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.