asapltda Posted November 18, 2020 Share Posted November 18, 2020 Good evening, How can I achieve the effect of several rows of the tunimdbgrid (mobile) and / or unidbgrid (desktop) for each record of the datasource; and if it is possible to do it in a unidbgrid (desktop) example thanks Quote Link to comment Share on other sites More sharing options...
irigsoft Posted November 19, 2020 Share Posted November 19, 2020 Hi, You can use one column of uniDBGrid of Desktop , HTML text and uniDBGird.ForceFit = True to show result of that column like this in Query SELECT statement : SELECT '<H3>' + Produkts."Name" + '</H3>' + '<ul>' + Categories."Name" + '</ul>' + CASE WHEN CONVERT (varchar (250) , STUFF ( (SELECT CHAR (10) + '|||' + REPLACE (ParamName,'-','') + CHAR (10) + ParamValue FROM Table2 WHERE Table2."ID"=Produkts."ID" FOR XML Path ('')),1,1,'')) <> '' THEN '<h4>' + REPLACE (CONVERT (varchar (250) , STUFF ( (SELECT CHAR (10) + '|||' + REPLACE (ParamName,'-','') + CHAR (10) + ParamValue FROM Table2 WHERE Table2."ID"=Produkts."ID" FOR XML Path ('')),1,1,'')) ,'|||','</br>') + '</h4>' ELSE '' END + '<ul><ul><h4 align="right">Цена: ' + CAST (ROUND (Produkts."Price",2) as varchar (20)) + ', ' + lower (Produkt."Caption") + '</h4></ul></ul>' OR apply this: Quote Link to comment Share on other sites More sharing options...
mhmda Posted November 19, 2020 Share Posted November 19, 2020 You can use Xtemplate, you may refer to my mobile listview with action button video tutorial. Quote Link to comment Share on other sites More sharing options...
PS1 Posted March 20 Share Posted March 20 How can i use code below in DBGrid. When i just copy paste this, it doesn't work. (this code is used on mobile GridList and works) function beforeInit(sender, config) { config.loadingText=false; config.grouped=false; // config.selectedCls=''; config.itemTpl='<table style="width:100%;white-space: nowrap;vertical-align:middle;">'+ '<tr>'+ '<td style="color:#0160a9;padding-left:0px;font: bold 18px/24px helvetica, arial, sans-serif" colspan="2">{0}</td>'+ '</tr>'+ '<tr>'+ '<td style="font: 15px helvetica, arial, sans-serif;padding-top:4px;color:#535454;">{1}</td>'+ '</tr>'+ '<tr>'+ '<td style="font: 15px helvetica, arial, sans-serif;padding-top:4px;color:#535454;width:80%;white-space: normal;word-break: break-word;">{2}</td>'+ '</tr>'+ '</table>'; } Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 20 Share Posted March 20 3 minutes ago, PS1 said: How can i use code below in DBGrid(this code is used on mobile GridList and works). When i just copy paste this, it doesn't work. Hello, Search the forum using the keyword: XTemplate Quote Link to comment Share on other sites More sharing options...
PS1 Posted March 20 Share Posted March 20 i already searched but i've found only ,,very poorly'' idea in : and other in which video is not available: i guess the second one had good solution, like in mobile ListGrid. 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.