Canestraro Posted October 7, 2020 Share Posted October 7, 2020 Hello, is there a possibility to create two buttons in the unidbgrid status bar as shown in the image? Someone can help me as if I have, because I have to capture the click as well. Quote Link to comment Share on other sites More sharing options...
andyhill Posted October 7, 2020 Share Posted October 7, 2020 Here is an extract from one of my forms - the only problem is I have not worked out yet how to change the dates outside of the Date Grid Ajax Events, that is I can get Date Changes via their respective events but I want to access these date objects when the Sync Button is pressed, in other words get date from FromDateID and Set ToDateID with the same date. Happy for some help. ////////////////////////////////////////////////////////////////////////////// // Grid Uni Events (Buttons/Ajax) with grdSupplierB01 do begin ClientEvents.UniEvents.Clear; MyScript:= 'pagingBar.afterCreate=function pagingBar.afterCreate(sender) ' + '{ ' + ' ' + ' sender.add( ' + ' [ ' + ' { ' + ' xtype: "tbseparator" ' + ' }, ' + ' { ' + ' xtype: "button", ' + ' iconCls: "pictos pictos-refresh", ' + ' width: 24, ' + ' height: 24, ' + ' tooltip: "UnDo Changes", ' + ' handler: function() ' + ' { ' + ' ajaxRequest(fSupplierB.grdSupplierB01, "_UnDoChanges_", []); ' + ' } ' + ' }, ' + ' { ' + ' xtype: "tbseparator" ' + ' }, ' + ' { ' + ' xtype: "button", ' + ' iconCls: "pictos pictos-pencil", ' + ' width: 24, ' + ' height: 24, ' + ' tooltip: "Edit Record", ' + ' handler: function() ' + ' { ' + ' ajaxRequest(fSupplierB.grdSupplierB01, "_EditRecord_", []); ' + ' } ' + ' }, ' + ' { ' + ' xtype: "tbseparator" ' + ' }, ' + ' { ' + ' xtype: "button", ' + ' iconCls: "pictos pictos-check2", ' + ' width: 24, ' + ' height: 24, ' + ' tooltip: "Post", ' + ' handler: function() ' + ' { ' + ' ajaxRequest(fSupplierB.grdSupplierB01, "_PostRecord_", []); ' + ' } ' + ' }, ' + ' { ' + ' xtype: "tbseparator" ' + ' }, ' + ' { ' + ' xtype: "button", ' + ' iconCls: "pictos pictos-add", ' + ' width: 24, ' + ' height: 24, ' + ' tooltip: "Add", ' + ' handler: function() ' + ' { ' + ' ajaxRequest(fSupplierB.grdSupplierB01, "_AddRecord_", []); ' + ' } ' + ' }, ' + ' { ' + ' xtype: "tbseparator" ' + ' }, ' + ' { ' + ' xtype: "button", ' + ' iconCls: "pictos pictos-delete", ' + ' width: 24, ' + ' height: 24, ' + ' tooltip: "Delete", ' + ' handler: function() ' + ' { ' + ' ajaxRequest(fSupplierB.grdSupplierB01, "_DeleteRecord_", []); ' + ' } ' + ' }, ' + ' { ' + ' xtype: "tbseparator" ' + ' }, ' + ' { ' + ' xtype: "datefield", ' + ' fieldLabel: "", ' + ' formatText: "From Date", ' + ' labelWidth: "0px", ' + ' format: "d/m/Y", ' + ' value: new Date(), ' + ' id: "FromDateID", ' + ' width: 120, ' + ' startDay: 1, ' + ' listeners: ' + ' { ' + ' change: function(el, v) ' + ' { ' + ' ajaxRequest(fSupplierB.grdSupplierB01, "_FromDateIDChange_", ["dtIndx=0", "val=" + Ext.Date.format(v, "d/m/Y")]) ' + ' } ' + ' } ' + ' }, ' + ' { ' + ' xtype: "tbseparator" ' + ' }, ' + ' { ' + ' xtype: "button", ' + ' iconCls: "pictos pictos-calendar", ' + ' width: 24, ' + ' height: 24, ' + ' tooltip: "Sync Dates", ' + ' handler: function() ' + ' { ' + ' ajaxRequest(fSupplierB.grdSupplierB01, "_SyncDateID_", []); ' + ' } ' + ' }, ' + ' { ' + ' xtype: "tbseparator" ' + ' }, ' + ' { ' + ' xtype: "datefield", ' + ' fieldLabel: "", ' + ' formatText: "To Date", ' + ' labelWidth: "0px", ' + ' format: "d/m/Y", ' + ' value: new Date(), ' + ' id: "ToDateID", ' + ' width: 120, ' + ' startDay: 1, ' + ' listeners: ' + ' { ' + ' change: function(el, v) ' + ' { ' + ' ajaxRequest(fSupplierB.grdSupplierB01, "_ToDateIDChange_", ["dtIndx=0", "val=" + Ext.Date.format(v, "d/m/Y")]) ' + ' } ' + ' } ' + ' }, ' + ' { ' + ' xtype: "tbseparator" ' + ' }, ' + ' ]); ' + '} '; ClientEvents.UniEvents.Add(MyScript); end; Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 8, 2020 Share Posted October 8, 2020 13 hours ago, Canestraro said: is there a possibility to create two buttons in the unidbgrid status bar as shown in the image? Someone can help me as if I have, because I have to capture the click as well. Hello, The forum has solutions to your questions. You can also use the PagingBarAuxControl property of the grid. Please use the search engine on the forum. Quote Link to comment Share on other sites More sharing options...
x11 Posted October 8, 2020 Share Posted October 8, 2020 http://forums.unigui.com/index.php?/topic/14402-встроить-unidbnavigator-в-сетку-unidbgrid/&do=findComment&comment=77913 Quote Link to comment Share on other sites More sharing options...
andyhill Posted October 8, 2020 Share Posted October 8, 2020 I am using Native Sencha objects - not Delphi UniGUI AuxControl objects. 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.