Jump to content

andyhill

uniGUI Subscriber
  • Posts

    1257
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by andyhill

  1. Yes Sherzod - that was embarrassing - thank you. FYI 'show' works fine but 'hide' does not and that goes for IDE/EventEditor versions and RUNTIME/Create versions - 'show' works fine in both cases but 'hide' does not work in either. Any ideas ?
  2. Sherzod, on Grids created at runtime (in FormCreate) my runtime assigned events do not fire ? If Grids are added to the Form in the IDE and Events are set in the ClientEvents Editor they do fire. FormCreate grdSuppliers:= TUniDBGrid.Create(pnlInfo); (pnlInfo is a child of MainForm) // Show grdSuppliers.ClientEvents.ExtEvents.Clear; MyScript:= 'show=function show(sender, eOpts)'#10+ '{ '#10+ ' ajaxRequest(MainForm.grdSuppliers, ''_Showing_'', []); '+ (tried different ways - NEVER FIRES) ' ajaxRequest(MainForm.pnlInfo.grdSuppliers, ''_Showing_'', []); '+ (tried different ways - NEVER FIRES) ' ajaxRequest(MainForm.window, ''_Showing_'', []); '+ (tried different ways - NEVER FIRES) ' ajaxRequest(MainForm, ''_Showing_'', []); '+ (tried different ways - NEVER FIRES) '} '; grdSuppliers.ClientEvents.ExtEvents.Add(MyScript); Please show me how to add 'Show' Event at runtime to a Grid created at runtime whose parent is pnlInfo - Thanks
  3. Grids are shown and hidden at runtime
  4. Can we please make Grid Hide/Show events work. MyScript:= 'show=function show(sender, eOpts)'#10+ '{ '#10+ ' ajaxRequest(MainForm.grdSuppliers, ''_Showing_'', []); '+ '} '; grdSuppliers.ClientEvents.ExtEvents.Add(MyScript);
  5. Sherzod, I tried to implement based on your suggestion grdTest.JSInterface.JSCode(#1'.pagingBar.getComponent("supFilter").setIcon("images/navigator/filter-16.png"'); FAILS, Error attached. I moved it out of grdTest AjaxEvent into MainForm AjaxEvent - same error ////////////////////////////////////////////////////////////////////////////// if SameText('_SuppFilter_', EventName) then begin grdTest.JSInterface.JSCode(#1'.pagingBar.getComponent("supFilter").setIcon("images/navigator/filter-16.png"'); end; Please advise - thanks
  6. I want to use these events to process some house cleaning processes
  7. Yes, I understand I need to add id: "tstFilter" to Pagingbar button object. I am trying to work out the syntax to change the Pagingbar icon with id: "tstFilter" grdTest.JSInterface.JSCode(#1'.pagingBar.tstFilter.setIcon(''images/navigator/filter-16.png'');'); Please advise
  8. I have the following button added to the Grid's Built-In Paging Bar ' {'#13#10 + ' xtype: '#39'button'#39','#13#10 + ' icon: '#39'images/navigator/unfilter2.png'#39','#13#10 + ' width: 24,'#13#10 + ' height: 24,'#13#10 + ' tooltip: '#39'Filter'#39','#13#10 + ' handler: function() '#13#10 + ' {'#13#10 + ' ajaxRequest(sender, '#39'_Filter_'#39', []); '#13#10 + ' } '#13#10 + ' },'#13#10 + ... Subject to logic, change image grdTest.JSInterface.JSCode --> icon: 'images/navigator/filter2.png' grdTest.JSInterface.JSCode --> icon: 'images/navigator/unfilter2.png' Please advise how I can change the icon image at runtime - Thanks in advance
  9. function window.afterrender(sender, eOpts) { var PhysicalWidth = screen.width; var PhysicalHeight = screen.height; var ScreenWidth = screen.availWidth; var ScreenHeight = screen.availHeight; var BrowserWidth = Ext.getBody().getViewSize().width; var BrowserHeight = Ext.getBody().getViewSize().height; var BrwsrInnerWth = window.innerWidth; var BrwsrInnerHgt = window.innerHeight; var r = window.orientation; ajaxRequest(MainForm.window, '_Rendered_', ["r="+r, "ScreenWidth="+ScreenWidth, "ScreenHeight="+ScreenHeight, "PhysicalWidth="+PhysicalWidth, "PhysicalHeight="+PhysicalHeight, "BrowserWidth="+BrowserWidth, "BrowserHeight="+BrowserHeight, "BrwsrInnerWth="+BrwsrInnerWth, "BrwsrInnerHgt="+BrwsrInnerHgt ]); } // ONLY FIRES bclose, cinfo, afterrender(not my one), resize procedure TMainForm.UniFormAjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); begin ////////////////////////////////////////////////////////////////////////////// if SameText('_Rendered_', EventName) then begin // NEVER FIRES Please advise - Thanks in advance
  10. procedure TMainForm.UniFormCreate(Sender: TObject); ... ////////////////////////////////////////////////////////////////////////////// grdSuppliers.ClientEvents.ExtEvents.Clear; MyScript:= 'hide=function hide(sender, eOpts)'#10+ '{ '#10+ ' ajaxRequest(MainForm.grdSuppliers, ''_Hiding_'', []); '+ '} '; grdSuppliers.ClientEvents.ExtEvents.Add(MyScript); // MyScript:= 'show=function show(sender, eOpts)'#10+ '{ '#10+ ' ajaxRequest(MainForm.grdSuppliers, ''_Showing_'', []); '+ '} '; grdSuppliers.ClientEvents.ExtEvents.Add(MyScript); ... // ONLY EVENTS FIRED data/load/columnresize procedure grdSuppliersAjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); ... ////////////////////////////////////////////////////////////////////////////// if SameText('_Hiding_', EventName) then begin // NEVER FIRES ////////////////////////////////////////////////////////////////////////////// if SameText('_Showing_', EventName) then begin // NEVER FIRES Please advise - Thanks in advance
  11. Yes Sherzod, the "dateValue=Ext.Date.parse" code above was perfect - thank you again. I understand that I can add my own NavigationBar but I prefer to use the auto-built-in PagingBar one that comes with the Grid Component (this reduces component count on large projects). I understand your MaxInt suggestion. In the future, can we get Sencha to allow the PagingBar to be shown even when the grid is not in Paged Mode (I control which buttons are shown and which buttons are hidden). Also an Auto-PageSize would be a nice addition. Thanks again.
  12. Yes, WebOptions:- Paged:= True; PageSize:= AUTO; Grid is auto-sizing via flex container, Screen real-estate varies, Grid.Row.Cell.Font's vary, I want the Grid fully populated with maximum number of rows. "Constantly re-calculating the Grid Size and Re-Setting the PageSize is just not elegant - plus rows are not always flush with Grid Footer (grid size / font sizing etc.) no matter how it is calculated"
  13. Grid is displayed in Panel with Flex sizing that effects the Grid Size and Therefore the PageSize (including Orientation). Constantly re-calculating the Grid Size and Re-Setting the PageSize is just not elegant - plus rows are not always flush with Grid Footer (grid size / font sizing etc.).
  14. Thank You Sherzod, will test. As you have explained we have to have Paged Mode in order to display the Grid's in-built PagingBar, how can we make the PageSize Automatic ?
  15. I have, see txt file above, extract below MyScript:= 'pagingBar.afterCreate=function pagingBar.afterCreate(sender)'#13#10 + '{'#13#10 + ' '#13#10 + ' sender.add('#13#10 + ' [ '#13#10 + ' {'#13#10 + ' xtype: '#39'tbseparator'#39#13#10 + ' },'#13#10 + ' {'#13#10 + ' xtype: "datefield", '#13#10 + ' fieldLabel: "", '#13#10 + ' formatText: "Date", '#13#10 + ' labelWidth: "0px", '#13#10 + ' format: "d/m/Y", '#13#10 + ' value: new Date(), '#13#10 + ' id: "gridDate2", '#13#10 + ' width: 120, '#13#10 + ' startDay: 1, '#13#10 + ' listeners: '#13#10 + ' {'#13#10 + ' change: function(el, v) '#13#10 + ' {'#13#10 + ' ajaxRequest(sender, '#39'_DateChange_'#39', ["dtIndx=0", "val=" + Ext.Date.format(v, "d/m/Y")]) '#13#10 + ' }'#13#10 + ' }'#13#10 + ' },'#13#10 + ... Please advise how I can set the Grid's PagingBar DatePicker(id: "gridDate2") outside of Grid event.
  16. I want to keep my PagingBar so will suffer Paged Mode for now. Please advise how I can set the Grid's PagingBar DatePicker(id: "gridDate2") outside of Grid event.
  17. Sherzod, can you please give me the JSCall to set the PagingBar DatePicker (id: "gridDate2" see GridPagingBarScript.txt above) Date - thanks Also, how to show PagingBar when grid is not in paged mode.
  18. This is what I found, there are several grids and I wanted to sync all Grid DatePicker's value no matter which grid DatePicker was clicked, I did this by using the same DatePicker ID (I know it was naughty). Going back to unique DatePicker ID's - all good - except no date syncing. Please show me how to set/update the value of the DatePicker in each of the Grids PagingBar at runtime - Thanks. grdTest DatePicker id: "gridDate" grdTest2 DatePicker id: "gridDate2" etc. Thinking Out Aloud ??? with grdTest2.JSInterface do begin with pagingBar.JSInterface do begin JSCall('getPicker().setValue', ['+MyDate+']); end; end; Please advise - Thanks
  19. UniDBNavigator1 is not the Built-In one but an externally added one, I need the Built-In PaginBar that has been modified by me in FormCreate Grid.UniEvents MyScript:= 'pagingBar.afterCreate=function pagingBar.afterCreate(sender)'#13#10 + '{'#13#10 + I add all of the new Buttons and DatePickers etc. here, all good, they show and work perfectly when paged
  20. I use data filtering logic to control the amount of data fetched and do not want the Grid in Paged mode, however I DO WANT the Built-In Navigation Bar - please advise how to show the Built-In Navigation Bar when not in Paged Mode - Thanks (I searched the forum but too many non related search results).
  21. Check the id name and the for=id name in the <label image above I have many panels, many HTMLFrames, a grid, and a hidden panel with 3 editors. Removing the hidden panel and removing reference to the editors makes no difference. Cannot slim down to shell (use third party ElevateDB and HtmlLib) which connects grids etc.. Sherzod, I believe it requires a remote session to resolve.
  22. "label for" ERRORS not traceable in my code. I cannot track down <label for="xx" ERRORS since latest update. Please advise - Thanks Andy
×
×
  • Create New...