andyhill Posted November 3, 2022 Share Posted November 3, 2022 This is how I add a datefield to a TUniDBGrid pagingbar, please show me how to add a spinedit field - thanks in advance. ' { ' + ' xtype: "datefield", ' + ' fieldLabel: "", ' + ' formatText: "From Date", ' + ' labelWidth: "0px", ' + ' format: "d/m/Y", ' + ' value: new Date(), ' + ' id: "_grdFromDate_", ' + ' width: 120, ' + ' startDay: 1, ' + ' listeners: ' + ' { ' + ' change: function(el, v) ' + ' { ' + ' ajaxRequest(MainForm.MyGrid, "_grdFromDate_", ["dtIndx=0", "val=" + Ext.Date.format(v, "d/m/Y")]) ' + ' } ' + ' } ' + ' }, ' + Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 3, 2022 Share Posted November 3, 2022 1 hour ago, andyhill said: TUniDBGrid pagingbar You can use PagingBarAuxControl property of UniDBGrid. Quote Link to comment Share on other sites More sharing options...
andyhill Posted November 3, 2022 Author Share Posted November 3, 2022 I understand but ALL of my apps use the style of code above, I use "tbseparator", "button", "datefield" - can I not use "edit" and "spinedit" etc. ? Can you show me an editor version and a possible spinedit version ? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 3, 2022 Share Posted November 3, 2022 3 hours ago, andyhill said: spinedit field xtype: 'numberfield' Quote Link to comment Share on other sites More sharing options...
andyhill Posted November 3, 2022 Author Share Posted November 3, 2022 Thanks Sherzod, all good except tooltip is not working, any ideas ? ' { ' + ' xtype: "numberfield", ' + ' width: 40, ' + ' tooltip: "Count", ' + ' value: '+IntToStr(Count)+', ' + ' listeners: ' + ' { ' + ' change: function(el, v) ' + ' { ' + ' ajaxRequest(MainForm.gAddresses, "_grdCount_", ["val=" + v]) ' + ' } ' + ' } ' + ' }, ' + Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 4, 2022 Share Posted November 4, 2022 11 hours ago, andyhill said: except tooltip is not working, any ideas ? {xtype: "numberfield", listeners: {render: function(c) {new Ext.ToolTip({target : c.getInputId(), html: "My tooltip"})}}} Quote Link to comment Share on other sites More sharing options...
andyhill Posted November 4, 2022 Author Share Posted November 4, 2022 Thanks Sherzod, This is my implementation:- ' { ' + ' xtype: "numberfield", listeners: {render: function(c) {new Ext.ToolTip({target : c.getInputId(), html: "Rows"})}}, '+ ' width: 40, ' + ' value: '+IntToStr(GridPageCount)+', ' + ' listeners: ' + ' { ' + ' change: function(el, v) ' + ' { ' + ' ajaxRequest(MainForm.gAddresses, "_grdNumberOfRows_", ["val=" + v]) ' + ' } ' + ' } ' + ' }, ' + ' { ' + ' xtype: "tbseparator" ' + ' }, ' + No errors but also no hint ? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 4, 2022 Share Posted November 4, 2022 You are using listeners twice, and thereby overwriting the first one. Use once, specifying two events. Quote Link to comment Share on other sites More sharing options...
andyhill Posted November 4, 2022 Author Share Posted November 4, 2022 Gotit - Thanks, I thought it needed it's own listener but now sharing one listener only 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.