codeb Posted June 13, 2015 Posted June 13, 2015 Hi! Is there solution to add custom title for Grouping title? I made UniDBGrid with grouping by date and there I get like grouping title : Date: 6/8/2015 I need to put day name in grouping title like Date: Monday, 6/8/2015 Is there some solution? Thanks! Quote
zilav Posted June 15, 2015 Posted June 15, 2015 Create a new calculated field that adds a day name before date and use it to group by? Quote
Sherzod Posted June 15, 2015 Posted June 15, 2015 Hi, You can use groupHeaderTpl Try to analyze this example: 1. Open: "C:\Program Files (x86)\FMSoft\Framework\uniGUI\Demos\Desktop\GridGrouping\grp.dproj" 2. Change grouping FieldName: 3. UniDBGrid1 -> ClientEvents -> UniEvents -> add function beforeInit function beforeInit(sender, config) { var groupingFeature = Ext.create('Ext.grid.feature.Grouping',{ groupHeaderTpl: 'Date: {[Ext.util.Format.date(Ext.Date.parse(values.name, "d.m.Y G:i:s"), "l, d/m/Y")]}', hideGroupedHeader: true }); config.features = [groupingFeature] } 4. Result: Note: you may have a different date format Best regards. Quote
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.