asapltda Posted March 13, 2019 Share Posted March 13, 2019 Good night, I need to display multiple lines of a query to a table, as seen in the image above. I found an example some time but unfortunately I lost it and did not find it again. in advance thank you if someone has an example, I remember that html and table were used with the fields to be deployed and the before init event Link to comment Share on other sites More sharing options...
Sherzod Posted March 13, 2019 Share Posted March 13, 2019 Hello, Try to search on the forum with keywords: XTemplate, Tpl Link to comment Share on other sites More sharing options...
asapltda Posted March 13, 2019 Author Share Posted March 13, 2019 VIEW 2 Link to comment Share on other sites More sharing options...
warat mookdaanan Posted May 5, 2020 Share Posted May 5, 2020 On 3/14/2019 at 4:04 AM, asapltda said: VIEW i try to do this function beforeInit(sender, config) { config.loadingText='ppp...'; config.grouped=false; config.selectedCls=''; config.itemTpl='<table style="width:100%;white-space: nowrap;vertical-align:middle;">'+ '<tr>'+ '<td style="color:#3a6383;padding-left:5px;" colspan="2">aaa: (0)</td>'+ '</tr>'+ '<tr>'+ '<td style="font-size:15px;padding-top:4px;padding-left:5px;color:#535454;">(1)</td>'+ '</tr>'+ '<tr>'+ '<td style="font-size:15px;padding-top:4px;padding-left:5px;color:#535454;">(2)</td>'+ '</tr>'+ '</table>'; } but it not work i use unimDBgrid what i must to do Link to comment Share on other sites More sharing options...
Sherzod Posted May 5, 2020 Share Posted May 5, 2020 1 hour ago, warat mookdaanan said: but it not work i use unimDBgrid Sorry, what exactly doesn’t work? Link to comment Share on other sites More sharing options...
warat mookdaanan Posted May 5, 2020 Share Posted May 5, 2020 9 hours ago, Sherzod said: Sorry, what exactly doesn’t work? i don ' t know to explain what exactly doesn’t work? but not problem i have new problem in unimDBGrid column show my number when i use android mobile and android tablet my number is show 1.500,00 but in my daughter iPhone is show 1,500.00 i must to solve this problem i want my number is 1,500.00 i try to download unigui last version 1.90.0.1531 but everything is not change Please tell me for solve this problem Link to comment Share on other sites More sharing options...
Sherzod Posted May 5, 2020 Share Posted May 5, 2020 47 minutes ago, warat mookdaanan said: when i use android mobile and android tablet my number is show 1.500,00 but in my daughter iPhone is show 1,500.00 i must to solve this problem i want my number is 1,500.00 Ok we will check. Link to comment Share on other sites More sharing options...
asapltda Posted May 5, 2020 Author Share Posted May 5, 2020 object UnimDBListGrid1: TUnimDBListGrid Left = 0 Top = 47 Width = 312 Height = 331 Hint = '' Align = alClient DataSource = GET_TOT_INSALDOOPNUMEROCLIENTE_D // Recurso:{1} {0} <------ SAME COLUMN DBLISTGRID ClientEvents.UniEvents.Strings = ( 'beforeInit=function beforeInit(sender, config)'#13#10'{'#13#10' config.grou' + 'ped=true;'#13#10' config.selectCls='#39#39';'#13#10' config.itemTpl='#39'<table styl' + 'e="width:100%;white-space: wrap;vertical-align:middle;">'#39' +'#13#10' '#39 + '<tr>'#39'+'#13#10' '#39'<td colspan"2"> Recurso:{1} {0} </td>'#39' +'#13#10' '#39'<tr>' + #39' +'#13#10' '#39'<td> OpNumero:{3} Saldo:{2} QtyRes: {10} Clf: {4} U/M:' + ' {5} Emp:{6} QtxEmp: {7} </td>'#39' +'#13#10' '#39'<tr>'#39' +'#13#10' '#39'<td> OpSts' + ':{8} OpFecha: {13} FecVen:{9} QtyOP {11} QtyPrd: {12} </td>'#39' +' + #13#10#13#10' '#39'</table>'#39';'#13#10'}') Options = [dgColLines, dgRowLines, dgConfirmDelete] WebOptions.FetchAll = True DisclosureIcon = True OnDisclose = UnimDBListGrid1Disclose OnClickHold = UnimDBListGrid1ClickHold OnClick = UnimDBListGrid1Click Columns = < // COLUMN 0 item Title.Caption = 'DRECURSO' FieldName = 'DRECURSO' Width = 64 end // COLUMN 1 item Title.Caption = 'RECURSO' FieldName = 'RECURSO' Width = 64 end item Title.Caption = 'SALDO' FieldName = 'SALDO' Width = 64 end item Title.Caption = 'OPNUMERO' FieldName = 'OPNUMERO' Width = 64 end item Title.Caption = 'CLFCOD' FieldName = 'CLFCOD' Width = 64 end item Title.Caption = 'UNDMED ' FieldName = 'UNDMED ' Width = 64 end item Title.Caption = 'UNDMEDEMPAQUE ' FieldName = 'UNDMEDEMPAQUE' Width = 64 end item Title.Caption = 'UNIDADESXEMPAQUE' FieldName = 'UNIDADESXEMPAQUE' Width = 64 end item Title.Caption = 'ACTIVO' FieldName = 'ACTIVO' Width = 64 end item Title.Caption = 'FECVEN' FieldName = 'FECVEN' Width = 64 end item Title.Caption = 'QTYRES' FieldName = 'QTYRES' Width = 64 end item Title.Caption = 'QTYOP' FieldName = 'QTYOP' Width = 64 end item Title.Caption = 'QPRODUCCION' FieldName = 'QPRODUCCION' Width = 64 end item Title.Caption = 'OPFECHA' FieldName = 'OPFECHA' Width = 64 end item Title.Caption = 'QDISPONIBLE' FieldName = 'QDISPONIBLE' Width = 64 end> end end end ------------------------------------------------------------------------------------------------------------------- Link to comment Share on other sites More sharing options...
belo Posted May 11, 2020 Share Posted May 11, 2020 Hi! // Use the OnGetText event of your numeric field procedure TUniMainModule.PEDIDOSPRO_PRECOGetText(Sender: TField; var Text: string; DisplayText: Boolean); begin Text := FormatCurr('Preço: R$ ##,###,##0.00', Sender.AsFloat); end; Best Regards, Eduardo Belo Link to comment Share on other sites More sharing options...
Recommended Posts