Jump to content

delagoutte

uniGUI Subscriber
  • Posts

    587
  • Joined

  • Last visited

  • Days Won

    12

Everything posted by delagoutte

  1. is there a simple method that can be used to follow the user activity in my unigui app. a thing like that exist ? proecdure TUniMainModule.onReceiveMessage(ComponentClicked : tuni....) begin if ComponentClicked.classname = tunibutton then log(ComponentClicked.ownerForm+ComponentClicked.name+self.usr_name); end
  2. sorry it is the same thing : a TFDQuery
  3. exemple : myquery1.sql.text := 'select filed1, field2, field3 from mytable'; myquery = fdquery that is linked to a datasaource that is linked to my grid. visiblefield.text := 'field3'+#13#10+'field2'; // it is a tstringlist, only field2 and field3 are visible on my grid and the order in the list is the order in the grid for i:= 0 to GenQuery1.FieldCount-1 do begin if (VisibleField.IndexOf(UpperCase(GenQuery1.Fields[i].FieldName))<>-1) then begin GenQuery1.Fields[i].Visible := True; end else begin GenQuery1.Fields[i].Visible := false; end; end; // if a field is not visible , it is not exported //reorder column in same order that in the grid for i := 0 to VisibleField.Count-1 do begin if GenQuery1.FieldDefs.IndexOf(VisibleField.Strings[i])<>-1 then begin GenQuery1.FieldByName(VisibleField.Strings[i]).Index := i; end; end;
  4. i use a tstringlist with all field that are visible in the grid After, i modify the dataset with a code like this : MyQuery.Fields[i].Visible := (VisibleField.IndexOf(UpperCase(MyQuery.Fields[i].FieldName))<>-1); proposable because you open directly the file from you browser- > excel open the files in protected mode
  5. Is there any way that unigui grid uses the filtering capabilities of extjs grids like in this extjs sample ? https://examples.sencha.com/extjs/6.7.0/examples/kitchensink/?classic#grid-filtering
  6. i do it with apache. do you have install unigui runtime in this server : 192.168.150.70 ?
  7. i have a new method if you want : add uses ExtPascalUtils; Add a TuniHtmlMemo (MemoExport) on your form and set "top" to -1000 to hide it (don't use visible property) on ClientEvent.Extevents add this code in "push" : function push(sender, html, eOpts) { if ((html.trim() != "")&&(html.trim() != "&#8203;")){ var browserName = navigator.userAgent.toLowerCase(); if ( browserName.indexOf("msie") != -1) { sender.iframeEl.dom.contentWindow.focus(); sender.iframeEl.dom.contentWindow.print(); } else { if(browserName.indexOf("trident") != -1) { sender.iframeEl.dom.contentWindow.focus(); sender.iframeEl.dom.contentWindow.document.execCommand('print', false, null); } else { sender.iframeEl.dom.contentWindow.focus(); sender.iframeEl.dom.contentWindow.print(); }; }; } } Now all is ready. for printing html do this : procedure TMainForm.PrintText(Sender: TObject; aValue : string); begin UniSession.AddJS('if (!'+MemoExport.JSName+'.initialized){'+MemoExport.JSName+'.initialized=true;};');// i must add this for chrome at some users. sometimes the component is not initialized UniSession.AddJS(MemoExport.JSName+'.textareaEl.dom.value='+ StrToJS(aValue)+';'+MemoExport.JSName+'.pushValue();') end; .. procedure TMainForm.BtnPrintSelClick(Sender: TObject); begin PrintText(Sender,GetExportHtml); end;
  8. Are you shure that is an unigui problem ? Are you sure that the "loop " tag is implemented on the webos webbrowser ? if you do a simple html page with your code : the loop is ok or not ?
  9. mhmda : do you use your API as data provider for your unigui app or do you use firedac component with direct acces to db?
  10. do you test it with agris with many columns >50. If yes, have you got any problem with performance or not ?
  11. try this : replace ' sort: function() {'+#13#10+ ... ' if (this.el.hasCls(''x-column-header-sort-DESC'')) {'+#13#10+ by ' sort: function(a) {'+#13#10+ ... ' if (a==null && this.el.hasCls(''x-column-header-sort-DESC'')) {'+#13#10+
  12. No error in console ? have you got a column with checkbox for selection ? if not, try adding, YourGrid.options.dgcheckselect : true; Your column have sortable : true ? for your question about sender.multiSortLimit=10;' -> you couldn't have more than 10 column sorted see doc sencha
  13. i must do a little cleaning but i think it only remains useful code GridColumnSortWithCancel.zip
  14. now, i have a solution. i'll try to do a small sample project
  15. no, i think he want a column sort with 3 states for exemple : first click on column header-> ASC Sort second Click on column header -> DESC sort third Click on oclumn header -> NO sort 4th click on column header->ASC SORT . ......
  16. Could you advance on this project ? a sample exist with or without course ?
  17. Could you advance on this project ? a sample exist with or without course ?
  18. have you try with https://***.***.***/myapp.dll/m ? maybe wechat use https and a redirect to a http link is restricted in many cases ?
×
×
  • Create New...