Freeman35 Posted February 18, 2019 Share Posted February 18, 2019 Hello, Can I add extra text in dbgrouped field row? Can do this make a via computed field or memtable, but Is this way limited field's size. On ScreenShot, I did it in browser, just for example for view. I wanna make a view like devex grouped view summary. Thank you. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 18, 2019 Share Posted February 18, 2019 "Kalan: 99,999.0123$" - Where do you get this value from? Quote Link to comment Share on other sites More sharing options...
Freeman35 Posted February 18, 2019 Author Share Posted February 18, 2019 Not good solution, but works for me. Why NOT good: I add calculated field and haveto give size 200byte. this mean 200 x RowCount and times session count. byte can be huge on server ram lost. object Q_GRP_Field: TStringField DisplayLabel = 'Field name' FieldKind = fkCalculated FieldName = 'GRP_Field' Size = 200 Calculated = True end Add calculated field, procedure TFRM_Tabela.Q_CalcFields(DataSet: TDataSet); var S: string; begin if DataSet.FieldByName('TBL_KB_TUTAR').AsFloat<0.0then S:= '<span class=''GRDStyle2''>( Fazla: ' else S:= '<span class=''GRDStyle4''>( Kişibaşı: '; DataSet.FieldByName('GRP_Field').AsString:= DataSet.FieldByName('TAB').AsString +' <span class=''GRDStyle4''> ( İaşe bedeli: ' +DataSet.FieldByName('BEDELI').DisplayText +' TL. ) </span>' +S +DataSet.FieldByName('TBL_KB_TUTAR').DisplayText +' )</span>'; end; and result Quote Link to comment Share on other sites More sharing options...
Freeman35 Posted February 18, 2019 Author Share Posted February 18, 2019 6 minutes ago, Sherzod said: "Kalan: 99,999.0123$" - Where do you get this value from? From query, same row has this value Quote Link to comment Share on other sites More sharing options...
mhmda Posted February 18, 2019 Share Posted February 18, 2019 Many times I use custom text in group header, so server side doesn't give much options so I use client side: Ext.XTemplate. Example: config.groupingFeature = Ext.create('Ext.grid.feature.Grouping',{ groupHeaderTpl:new Ext.XTemplate('<table class="defaultfont defaultfontsize11"><tr>'+ '<td style="font-weight:bold;color:#e62b1e;">'+ '{[this.getGroupTitle(values.rows[0])]}</td><td>'+ '({[values.children.length]} pax.)</td></tr></table>', { getGroupTitle: function(values) { return values.data[3][0]; } }) }); config.features= [config.groupingFeature]; And the the result: Quote Link to comment Share on other sites More sharing options...
Freeman35 Posted February 18, 2019 Author Share Posted February 18, 2019 Thank you mhmda. My problem is I don't know js ( and hate it ) In my app, client side has not that values, I need two colums "İaşe bedeli" this column not in grid so not on clientside, TBL_KB_TUTAR is added but need to grouped sum. Needed result iaşe bedeli - sum(TBL_KB_TUTAR) and been colored or css and bla bla. So compicated for me, I have to learn many js function and more then extjs class, property.... Quote Link to comment Share on other sites More sharing options...
mhmda Posted February 18, 2019 Share Posted February 18, 2019 I sent you PM. Quote Link to comment Share on other sites More sharing options...
mhmda Posted February 18, 2019 Share Posted February 18, 2019 This is my best friend: https://docs.sencha.com/extjs/6.6.0/modern/Ext.html When I was at college we didn't learn HTML,CSS etc...only: assembler, c, c++ So I it's all self learning and reading many books :-) 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.