rhennink Posted January 21, 2018 Share Posted January 21, 2018 H, I would like to show a rowbased hint/tooltip in the UniDBGrid. how can I arrange this? richard Link to comment Share on other sites More sharing options...
Sherzod Posted January 21, 2018 Share Posted January 21, 2018 Hi, Can you tell in more detail, what you wanted ? Link to comment Share on other sites More sharing options...
rhennink Posted January 21, 2018 Author Share Posted January 21, 2018 Sure! thnx!! In this UniDBGrid we show the detail-data of the PlanningLines. When selecting a Row (so the PlanningLine) I would like to show a tooltip/hint referring to the remark-field of the database-line. in short; when changing the row in the DBGrid, the tooltip.hint should changed with the remark-value of the line. Link to comment Share on other sites More sharing options...
Sherzod Posted January 21, 2018 Share Posted January 21, 2018 Have you seen this post also ?: http://forums.unigui.com/index.php?/topic/6712-overflowing-text-grid-cell-tooltip/ Link to comment Share on other sites More sharing options...
bbm Posted April 12, 2018 Share Posted April 12, 2018 Hi, is this working with 6.5.3? Best regards Link to comment Share on other sites More sharing options...
Sherzod Posted April 13, 2018 Share Posted April 13, 2018 Hi, is this working with 6.5.3? Yes Link to comment Share on other sites More sharing options...
bbm Posted April 13, 2018 Share Posted April 13, 2018 Hi, I tried the script in my application, but it doesn't work. The column is the first in the DBGrid. An empty tooltip will be shown, but also wrong text. I set the ShowToolTip and the ShowToolTipAlways to True. Otherwise there is no tooltip to see. Best regards Link to comment Share on other sites More sharing options...
Sherzod Posted April 13, 2018 Share Posted April 13, 2018 Hi, I set the ShowToolTip and the ShowToolTipAlways to True. Yes sorry, you can use these properties instead of the "script" I tried the script in my application, but it doesn't work. The column is the first in the DBGrid. An empty tooltip will be shown, but also wrong text. I set the ShowToolTip and the ShowToolTipAlways to True. Otherwise there is no tooltip to see. Can you make a simple testcase for this? Link to comment Share on other sites More sharing options...
bbm Posted April 13, 2018 Share Posted April 13, 2018 Hi, I add the column of the DBGrid in the "Create"-Methode of a frame After adding (in the same procedure) I set the property ShowToolTip and ShowToolTipAlways to True. I tried also without the script, but I get the same result as you can see in the picture. Could it be a problem when adding new columns at runtime? Best regards Link to comment Share on other sites More sharing options...
mhmda Posted April 16, 2018 Share Posted April 16, 2018 I use 'metadata.tdAttr' at client side to display a custom hint: Link to comment Share on other sites More sharing options...
bbm Posted April 17, 2018 Share Posted April 17, 2018 Hi, looks good! Do you have an example how to integrate this (sorry, if it's a stupid question)? Best regards Link to comment Share on other sites More sharing options...
Volk65 Posted April 17, 2018 Share Posted April 17, 2018 looks good! Do you have an example how to integrate this +1 If possible, give an example Link to comment Share on other sites More sharing options...
mhmda Posted April 17, 2018 Share Posted April 17, 2018 Here is quick example: UniDBGrid->Ext Events->ViewReady Event: function viewready(sender, eOpts) { sender.getColumns()[0].renderer = function (value, metadata, record) { myToolTipText = "<table class='tblRecGridRowToolTip'>"+ "<tr class='tdToolTip'>"+ "<td class='tblRecGridRowToolTipTitle'>Reference:</td>"+ "<td class='tblRecGridRowToolTipValue'>5006247</td>"+ "</tr>"+ "<tr class='tdToolTip'>"+ "<td class='tblRecGridRowToolTipTitle'>Debit account:</td>"+ "<td class='tblRecGridRowToolTipValue'>Suppliers account</td>"+ "</tr>"+ "</table>"; metadata.tdAttr = 'data-qclass="dvQtip" data-qtip="' + myToolTipText + '"'; }; MainForm.UniDBGrid1.getView().refresh(); } You may use Xtemplate for you Tool-tip text and from 'record' variable you can extract the fields value. 1 Link to comment Share on other sites More sharing options...
bbm Posted April 18, 2018 Share Posted April 18, 2018 Hi, thank you very much. It looks very nice. But in my application I create some columns at runtime in the "create" procedure (constructor). Is there also any way to use the solution, because there are a lot of possibilities with this kind of tooltip. Best regards Link to comment Share on other sites More sharing options...
mhmda Posted April 18, 2018 Share Posted April 18, 2018 ...function (value, metadata, record)... You have the record parameter which points to the whole row, so you can display any field you want. record.get('0') holds the value of the field which belongs the first column. record.get('1') holds the value of the field which belongs the second column. record.get('2') holds the value of the field which belongs the third column. ..... Regardless the name of the field in server side, Unigui always translated the field names to: '0','1','2','3','4'... Link to comment Share on other sites More sharing options...
bbm Posted April 18, 2018 Share Posted April 18, 2018 Hi, in my opinion the script is only running, when the columns a created at design time, because in the viewready event the columns will not be found. Am I wrong? Best regards Link to comment Share on other sites More sharing options...
mhmda Posted April 18, 2018 Share Posted April 18, 2018 I'm not sure but you may test it. Link to comment Share on other sites More sharing options...
bbm Posted April 19, 2018 Share Posted April 19, 2018 Hi, I tested it yet and, when I did everything right, the result is not. Do you have a plan B? Best regards Link to comment Share on other sites More sharing options...
Sherzod Posted April 19, 2018 Share Posted April 19, 2018 Hi, Can you make a simple testcase ?! Link to comment Share on other sites More sharing options...
bbm Posted April 19, 2018 Share Posted April 19, 2018 Hi, it is not so easy to make an example, because it is a complex project, but I try to explain. I have prepared a common function to prepare all used DBGrids. The options of the Grid will be configured. After that all columns will be added at runtime, also in a common function. I did it in this way, because we have to be very open to make changes for different customers. Both functions (configure the options of the Grid and adding columns) will be fired in the constructor of the different frames. And I think this is the problem, because for the viewready function it seems to be too late. Best regards Link to comment Share on other sites More sharing options...
mhmda Posted December 10, 2019 Share Posted December 10, 2019 In such case use: ClientEvents -> ExtEvents -> Ext.data.store -> store.load (event). This will happen after loading data. Link to comment Share on other sites More sharing options...
eduardosuruagy Posted December 11, 2019 Share Posted December 11, 2019 On 4/17/2018 at 5:11 PM, mhmda said: Here is quick example: UniDBGrid->Ext Events->ViewReady Event: function viewready(sender, eOpts) { sender.getColumns()[0].renderer = function (value, metadata, record) { myToolTipText = "<table class='tblRecGridRowToolTip'>"+ "<tr class='tdToolTip'>"+ "<td class='tblRecGridRowToolTipTitle'>Reference:</td>"+ "<td class='tblRecGridRowToolTipValue'>5006247</td>"+ "</tr>"+ "<tr class='tdToolTip'>"+ "<td class='tblRecGridRowToolTipTitle'>Debit account:</td>"+ "<td class='tblRecGridRowToolTipValue'>Suppliers account</td>"+ "</tr>"+ "</table>"; metadata.tdAttr = 'data-qclass="dvQtip" data-qtip="' + myToolTipText + '"'; }; MainForm.UniDBGrid1.getView().refresh(); } You may use Xtemplate for you Tool-tip text and from 'record' variable you can extract the fields value. Can you make an example in practice? Link to comment Share on other sites More sharing options...
55143681 Posted December 12, 2019 Share Posted December 12, 2019 12 hours ago, eduardosuruagy said: Can you make an example in practice? On 12/10/2019 at 8:31 PM, mhmda said: In such case use: ClientEvents -> ExtEvents -> Ext.data.store -> store.load (event). This will happen after loading data. Can you paste an example picture? Link to comment Share on other sites More sharing options...
mhmda Posted December 12, 2019 Share Posted December 12, 2019 Link to comment Share on other sites More sharing options...
eduardosuruagy Posted December 12, 2019 Share Posted December 12, 2019 3 hours ago, mhmda said: Sorry, I can not reproduce. Can you make an example? 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