Jump to content

Recommended Posts

Posted

Hello,

 

 

Good morning
 
How can i get the title from specified column at runtime with js?
 
Thanks

 

 

Which edition and build are you using?!

Posted

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?

Posted
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

Posted
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?

Posted
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
  • 11 months later...
Posted

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

 

 

 

Posted
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?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...