artem_niko Posted January 21, 2023 Share Posted January 21, 2023 Hello! How add text here? This is top left corner in UniDBGrid. I need show some text in this place. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 21, 2023 Share Posted January 21, 2023 Hello, Are you using "rownumberer"? Quote Link to comment Share on other sites More sharing options...
artem_niko Posted January 21, 2023 Author Share Posted January 21, 2023 6 minutes ago, Sherzod said: Hello, Are you using "rownumberer"? Number of lines? Yes Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 21, 2023 Share Posted January 21, 2023 34 minutes ago, artem_niko said: Number of lines? Yes Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 21, 2023 Share Posted January 21, 2023 In addition, just add: columns[0].setText('New title'); function reconfigure(sender, store, columns, oldStore, oldColumns, eOpts) { if (columns[0].xtype && columns[0].xtype == 'rownumberer') { columns[0].width = 100; columns[0].setText('New title'); } } Quote Link to comment Share on other sites More sharing options...
artem_niko Posted January 21, 2023 Author Share Posted January 21, 2023 2 hours ago, Sherzod said: In addition, just add: columns[0].setText('New title'); function reconfigure(sender, store, columns, oldStore, oldColumns, eOpts) { if (columns[0].xtype && columns[0].xtype == 'rownumberer') { columns[0].width = 100; columns[0].setText('New title'); } } Scripsi eam, sicut hic. Video quod latitudo cell est mutata, sed illud non est propono. Text quodammodo oportet transferri separatim ad hoc cell? Ego postulo ut illud tradere programmatically. Ego iustus volo ut ostenderet numero ordines in eget est. In CSS, uti paulo codice, in quo ego mutare colorem agmen cum linea numeri: .x-grid-cell-row-numberer { color: black !important; /*номера строк в таблице*/ font-style: bold !important; background-color: #F8F9F9 !important; border: none; } 2 hours ago, Sherzod said: columns[0].setText('New title'); Possibile est assignare text programmatically aut quid? update: Oh, no, suus ' bysso. Ego animadverto ut propono text, sed, propter aliquam causam, id est, vix apparent, quia fons est albus propter aliquam causam. Sed, in CSS code supra, non mutare font. Quam operor ego proprius font color? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 21, 2023 Share Posted January 21, 2023 36 minutes ago, artem_niko said: Scripsi eam, sicut hic. Video quod latitudo cell est mutata, sed illud non est propono. Text quodammodo oportet transferri separatim ad hoc cell? Ego postulo ut illud tradere programmatically. Ego iustus volo ut ostenderet numero ordines in eget est. In CSS, uti paulo codice, in quo ego mutare colorem agmen cum linea numeri:... Don't torment us with your good knowledge of Latin. Quote Link to comment Share on other sites More sharing options...
artem_niko Posted January 21, 2023 Author Share Posted January 21, 2023 6 minutes ago, Sherzod said: Don't torment us with your good knowledge of Latin. Oh, I'm terribly sorry...The wrong language was in the translator In general, I said above that your code works, but there are two questions about it: 1. How to programmatically transfer text from the application? 2. Why is the white font in this cell? After all, in CSS I don't change the font color: .x-grid-cell-row-numberer { color: black !important; /*номера строк в таблице*/ font-style: bold !important; background-color: #F8F9F9 !important; border: none; } Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 21, 2023 Share Posted January 21, 2023 1 hour ago, artem_niko said: 1. How to programmatically transfer text from the application? For example: procedure TMainForm.UniFormReady(Sender: TObject); begin with UniDBGrid1 do if dgRowNumbers in Options then JSInterface.JSCall('getColumns()[0].setText', ['Title']); ... 1 Quote Link to comment Share on other sites More sharing options...
artem_niko Posted January 21, 2023 Author Share Posted January 21, 2023 32 minutes ago, Sherzod said: For example: procedure TMainForm.UniFormReady(Sender: TObject); begin with UniDBGrid1 do if dgRowNumbers in Options then JSInterface.JSCall('getColumns()[0].setText', ['Title']); ... Perfect! Thank you! 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.