Jump to content

gerardocrisci

uniGUI Subscriber
  • Posts

    177
  • Joined

  • Last visited

  • Days Won

    7

Everything posted by gerardocrisci

  1. in the example "uniGUI \ Demos \Desktop\Windowless" UniServerModule.MainFormDisplayMode = mfPage if I add to the source MainForm.OnAfterShow = UniFormAfterShow procedure TMainForm.UniFormAfterShow(Sender: TObject); begin UniMemo1.Lines.Add('--- > OnAferShow'); end; the OnAfterShow event is called 2 times. Why?
  2. The problem exists ... but you can evaluate .. before the components are created rate this test procedure TMainForm.UniFormCreate(Sender: TObject); begin UniDBGrid1.Columns.Delete(2); // before starting the data request .. the associated field will not be asked UniBitBtn1.Free; // it appears that the button is created ... but not combined with the click end; try and see if it's okay.
  3. procedure TMainForm.UniFormCreate(Sender: TObject); begin UniButton1.JSInterface.JSAddListener( 'click', 'function(){'+ UniPanel1.JSName +'.setVisible(!'+ UniPanel1.JSName +'.isVisible())'+ '}' ); end; i think you want to create a switch between visible and invisible
  4. maybe you can use this example of mine.. I created you a generic procedure (GetLocalStorage) that shows you all the values of localStorage and waits to read them in UniFormAjaxEvent. the procedure is started when the form is ready .. but you can also call it at the click of a button .. object MainForm: TMainForm OnReady = UniFormReady OnAjaxEvent = UniFormAjaxEvent type TMainForm = class(TUniForm) procedure UniFormReady(Sender: TObject); procedure UniFormAjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); private { Private declarations } FLKey: string; public { Public declarations } procedure GetLocalStorage; end; procedure TMainForm.GetLocalStorage; begin UniSession.AddJS( ' var p = [], keys = Object.keys(localStorage), i = 0, key; '+ ' for (; key = keys[i]; i++) { p.push( key + "=" + localStorage.getItem(key)); } '+ ' ajaxRequest(MainForm.window, "getKey", p); ' ); end; procedure TMainForm.UniFormReady(Sender: TObject); begin FLKey:=''; GetLocalStorage; end; procedure TMainForm.UniFormAjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); begin if EventName = 'getKey' then begin FLKey := Params.Values['lKey']; UniMemo1.Text := Params.Text; // <---- read all values end; I hope you find it useful ..
  5. thank you ... also applies the suggestion for string properties
  6. Initially I asked to consider OnGetText () for cell formatting ... later .. you created the ForceStringFormat property .. Now I don't understand why at that point .. there is a check on OnGetText and not on ForceStringFormat. The right check would be to check if the Field has a DisplayFormat set ... but I can do this with an override for GetForceStringFormat. I would like to give suggestions ... if you don't want them ... thanks anyway.
  7. this is an old discourse: http://jira.fmsoft.net/servicedesk/customer/portal/4/FSD-568 however I added this post ... but ... give me an answer ... I hope not to wait ... two years .. since 2018 has been reopened and I have not had an answer.
  8. For a better management of the string format of the field .. I ask you if it is possible to have this modification function TUniCustomDBGrid.GetCellData(const ColNo: Integer; var HasAttr: Boolean): TUniCellRecord; ... else begin // if Assigned(AField.OnGetText) then if wColumn.ForceStringFormat then begin if RawData then rValue := StrToJS(AField.DisplayText) else S := StrToJS(AField.DisplayText); end else begin to change " if Assigned(AField.OnGetText) then" in " if wColumn.ForceStringFormat then " for me it's important Grazie
  9. In the meantime .. I put a patch like this procedure TUniCustomDBGrid.JSEventHandler(AEventName: string; AParams: TUniStrings); var AStart, APage, ALimit : Integer; begin inherited; if AEventName = UNI_DATA_EVENT then begin if not (dgPersistentSelection in FOptions) then FBookmarks.Clear; if FDelayBeboreLoad and FFirstLoad then Sleep(500); FFirstLoad := False; ALimit:=AParams['limit'].AsInteger; if FBufferedStore.FEnabled then begin APage :=StrToIntDef(AParams['page'].AsString, 1)-1; AStart := APage*ALimit; end else AStart := StrToIntDef(AParams['start'].AsString, -1); HandleData( AStart, AParams['limit'].AsInteger, AParams['options'].AsInteger, AParams['sort'].AsString, AParams['group'].AsString ); end; end;
  10. I think the answer is in this discussion ...
  11. seems to repeat the first 25 records You can control? Grazie
  12. in unit uniBasicGrid; TUniGridExporter.ExportGrid to correct the line in JSConfig('filename', [FFileName + '.' + Self.FExporter.FileExtention], ExpCfgObj); JSConfig('fileName', [FFileName + '.' + Self.FExporter.FileExtention], ExpCfgObj); n -> N please .Farshad Mohajeri ... for me you can also add this code TUniGridExporter = class(TPersistent) private function FileNameIsStored: Boolean; function TitleIsStored: Boolean; ... published ... property FileName: string read FFileName write SetFileName stored FileNameIsStored; property Title: string read FTitle write SetTitle stored TitleIsStored; end; function TUniGridExporter.FileNameIsStored: Boolean; begin Result := FFileName <> 'Export'; end; function TUniGridExporter.TitleIsStored: Boolean; begin Result := FTitle <> 'Exported Grid'; end; so as not to store the two values in dfm thank you
  13. https://examples.sencha.com/extjs/7.0.0/examples/kitchensink/#buffer-grid
  14. avevo capito, grazie I understood, thanks
  15. I have a question about the TITLE meta tag. because you only have to set it from TUniServerModule.title it is possible when it is empty to be able to set it but CustomMeta? Grazie
  16. sorry I have not seen the option thank you.
  17. it seems to me that UniDBGrid's OnTitleClick is not being called or I cannot activate it .. help me understand how to use it Grazie
  18. Ciao Sherzod in unit uniDBGrid procedure TUniCustomDBGridColumn.InitFilter(C: TJSObject; Fld: TField); (FEdit as IUniFormControl).ClearButton := True; TUniControlHack(FEdit).LayoutConfig.Width := '95%'; I think it's a solution is to create a property in Column.Filtering or generic .. like UseEditorClearButton stored false if NOT UseEditorClearButton then (FEdit as IUniFormControl).ClearButton := True; another block to consider a modification is the width property, I would modify the code in if TUniControlHack(FEdit).LayoutConfig.Width='' then TUniControlHack(FEdit).LayoutConfig.Width := '95%'; Grazie
  19. Ciao the value of UniDBGrid.Columns.Filtering.Editor.ClearButton it is always set to true. (?) is it possible to change it to false? Grazie
  20. Ciao Farshad Mohajeri I thank you for the answer.. I understand , creating a synchronized with the server is difficult .. in fact, I asked: to have a grid that displays data like the extjs example. And I asked if anyone had tried to do it ...and I asked for help (I didn't ask for someone to write a solution overnight ) I do not accept that there is a difficulty to overcome and it will not be solved. Then she is postponed for a year. Paying the cost of UNIGUI is not the difficulty (in fact I manage 2 licenses) .. who more than me believes in this Framework long life to UniGUI! But consider this: if a customer asks me: "the application must adapt to the device" I see your roadmap .. and I read "Responsive Layout" expected in Q1 / 2020 .. then I communicate the realization times to the customer .. if this is not done .. before 2021 ... i have a dissatisfied customer. My question remains: has anyone tried to recreate the example of extjs .. can you help?
  21. Hi can your attempts be published? As we read in the buffered-store.js file: "This particular service cannot sort on more than one field, so if grouped, it disables sorting." I (and many) don't need it. You need the bare minimum to view a large number of records ... this is a big problem that extj has solved with this example. I thank you for your work ... but I cannot avoid highlighting : reading this statement is disheartening! It was expected in Q1 / 2019 now we are in Q1 / 2020. .. a year without a solution (maybe .. it was better to write "we have not yet evaluated this point") I have invested in you for 5 years now ... with 2 licenses .. .. and while paying the more expensive version .. don't provide all your sources .. or our versions of the js files not minimized .. all of us other developers with these handicaps are forced to read up on extj's publications .. or learn from those who in this forum come up with ideas they share. and we are forced to wait do what you write Ps: I consider UniGUI a fabulous Framework .. ...
×
×
  • Create New...