nandrianakis Posted May 21, 2018 Share Posted May 21, 2018 Good morning How can i get the title from specified column at runtime with js? Thanks Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 21, 2018 Share Posted May 21, 2018 Hello, Good morning How can i get the title from specified column at runtime with js? Thanks Which edition and build are you using?! Quote Link to comment Share on other sites More sharing options...
nandrianakis Posted May 21, 2018 Author Share Posted May 21, 2018 The latest 1.10.0.1458 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 21, 2018 Share Posted May 21, 2018 Hi, The latest 1.10.0.1458 First of all, please adjust your forum email address: http://forums.unigui.com/index.php?/topic/6291-new-users-please-adjust-your-forum-email-address/ Quote Link to comment Share on other sites More sharing options...
nandrianakis Posted May 21, 2018 Author Share Posted May 21, 2018 Ok Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 21, 2018 Share Posted May 21, 2018 Thank you, How can i get the title from specified column at runtime with js? Do you want to get it on the client side, can you give more info? Quote Link to comment Share on other sites More sharing options...
nandrianakis Posted May 21, 2018 Author Share Posted May 21, 2018 function viewready(sender, eOpts) { sender.getColumns()[0].renderer = function (value, metadata, record ) { myToolTipText = "<table class='tblRecGridRowToolTip'>"; for (i=0;i< sender.getColumns().length;i++) { myToolTipText=myToolTipText+"<tr class='tdToolTip'>"+ "<td class='tblRecGridRowToolTipTitle'><b>HEADER</b></td>"+ "<td class='tblRecGridRowToolTipValue'>"+record.get(i)+"</td>"+ "</tr>"; } myToolTipText=myToolTipText+ "</table>"; metadata.tdAttr = 'data-qclass="dvQtip" data-qtip="' + myToolTipText + '"'; alert(myToolTipText); return value; }; sender.getView().refresh(); } I want to replace the word HEADER with columns header Rgs Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 21, 2018 Share Posted May 21, 2018 I want to replace the word HEADER with columns header Sorry, maybe I do not quite understand what you wanted Maybe this post can help you!?: http://forums.unigui.com/index.php?/topic/6712-overflowing-text-grid-cell-tooltip/&do=findComment&comment=34164 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 21, 2018 Share Posted May 21, 2018 Or, maybe you wanted this: HEADER -> + sender.getColumns()[0].text + Quote Link to comment Share on other sites More sharing options...
nandrianakis Posted May 21, 2018 Author Share Posted May 21, 2018 Yes This fn function viewready(sender, eOpts) { sender.getColumns()[0].renderer = function (value, metadata, record ) { myToolTipText = "<table class='tblRecGridRowToolTip'>"; for (i=0;i< sender.getColumns().length;i++) { myToolTipText=myToolTipText+"<tr class='tdToolTip'>"+ "<td class='tblRecGridRowToolTipTitle'><b>"+sender.getColumns().text+": </b></td>"+ "<td class='tblRecGridRowToolTipValue'>"+record.get(i)+"</td>"+ "</tr>"; } myToolTipText=myToolTipText+ "</table>"; metadata.tdAttr = 'data-qclass="dvQtip" data-qtip="' + myToolTipText + '"'; return value; }; sender.getView().refresh(); } It not works for some grids even for some records on the same grid Any idea? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 21, 2018 Share Posted May 21, 2018 Can you make a simple testcase for this? Quote Link to comment Share on other sites More sharing options...
nandrianakis Posted May 22, 2018 Author Share Posted May 22, 2018 Good morning Sorry its not so easy I found that If I will try to open the dataset oncreate event of the form it is ok If I place a button and open the dataset onclick event of the button is not working Quote Link to comment Share on other sites More sharing options...
azago Posted May 8, 2019 Share Posted May 8, 2019 How can i SET the title from specified column at runtime with js? I tried to use MyGrid.Columns[n].Title.Caption := 'New Title'; before to open dataset but non working .... Delphi Rio uniGUI version 1.90.0.1498 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 8, 2019 Share Posted May 8, 2019 6 hours ago, azago said: I tried to use MyGrid.Columns[n].Title.Caption := 'New Title'; before to open dataset but non working .... Hi, Columns are created "dynamically"? Can you make a simple testcase for this? 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.