Fábio Matte Posted May 13, 2021 Share Posted May 13, 2021 (edited) How can I do to load the code below into a ClientEvents> UniEvents? function beforeInit(sender, config) { config.loadingText='Carregando...'; config.grouped=true; config.selectedCls=''; var descr = '<table style="width: 100%; border-collapse: collapse; border-style: none; height: 10px;" border="0"> ' + '<tbody> ' + '<tr style="height: 10px;"> ' + '<td style="width: 9.33229%; height: 10px;"> ' + '<table style="height: 100%; width: 100%; border-collapse: collapse; border-style: hidden;" border="0" cellspacing="0" cellpadding="0"> ' + '<tbody> ' + '<tr> ' + '<td style="width: 100%;"><div class="circle"><img style="border-style: none; display: block; margin-left: auto; margin-right: auto;" src="ArquivosCliente/{7}/{6}/Fotos/Bens/thumbmail/{1}.jpg" onerror="this.src="http://wps.singus.com.br/html/img/singuslogo.png" alt="" width="50" height="55" </></div></td> ' + '</tr> ' + '</tbody> ' + '</table> ' + '</td> ' + '<td style="width: 90.6677%; height: 10px;"> '+ '<table style="width: 100%; border-collapse: collapse; border-style: hidden;" border="0" cellspacing="0" cellpadding="0"> '+ '<tbody> '+ '<tr> ' + '<td style="width: 100%;"><span style="font-size: 9px; padding-left: 5px;"><span style="font-family: tahoma,geneva,sans-serif;"><span style="color: #0000ff;"><strong>'+ 'TIPO: {0}</strong></span></span></span></td> '+ '</tr> '+ '<tr> ' + '<td style="width: 90%;"><span style="font-size: 9px; padding-left: 5px;"><span style="font-family: tahoma,geneva,sans-serif;"><span style="color: #ff0000;"><strong>{3}</strong></span></span></span></td> '+ '</tr> '+ '<tr> ' + '<td style="width: 100%;"><span style="font-size: 9px; padding-left: 5px;"><span style="font-family: tahoma,geneva,sans-serif;"><span style="color: #003300;"><strong>CHAPA ATUAL: {1} | CHAPA ANT.: {2}</strong></span></span></span></td> '+ '</tr> '+ '</tbody> '+ '</table> ' + '</td> ' + '</tr> ' + '</tbody> '+ '</table>'; config.itemTpl = new Ext.XTemplate(descr); } Edited May 14, 2021 by Fábio Matte Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 13, 2021 Share Posted May 13, 2021 20 minutes ago, Fábio Matte said: How can I do to load the code below into a ClientEvents> UniEvents? Hello, Can you please clarify your question? Quote Link to comment Share on other sites More sharing options...
Fábio Matte Posted May 13, 2021 Author Share Posted May 13, 2021 10 hours ago, Sherzod said: Hello, Can you please clarify your question? So, I need to add the code mentioned above in Properties: ClientEvents> UniEvents [Ext.dataview.List> beforeInit] of the UnimDBListGrid Component at Runtime (See Image) and not at design time, because the way it is here, added to the project , you are not attending me the way I need to. Quote Link to comment Share on other sites More sharing options...
Fábio Matte Posted May 14, 2021 Author Share Posted May 14, 2021 Good morning, I ended up managing to put it like this: lstInventario.ClientEvents.UniEvents.Values['beforeInit'] := myJSScript.Lines.Text; I store what I need inside a memo, and from there I carry it where I need it. Thanks. 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.