Jump to content


uniGUI Subscriber
  • Posts

  • Joined

  • Last visited

  • Days Won


ttamturk last won the day on April 26 2017

ttamturk had the most liked content!

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

ttamturk's Achievements

Advanced Member

Advanced Member (4/4)



  1. Why this question still not answered dunno, but i need to build and install uniGUI with external ddetours library and i can't do that without source codes. Is there anyway to do it? Ps: Also, adding third party libraries into compiled package's is never be a good idea. some of us and some components may be using same library for their selves. It should included with setup but can be used by outsourced.
  2. Hi, I can enable/disable ScreenMask for TUniPopupMenu, but i don't want to disable/enable for all menu items. Some menu items are check/radio items's and they don't have any onclick events. I can't find any way to do it and it seems there isn't any pas file for UniPopupMenu either. Is there any way to workaround this problem with this build? Also it will be very good idea to add ScreenMask property for UniMenuItem, not popup itself. Best regards.
  3. Hi, Before upgrading to last build (it was extjs 4 before) i used to add a listener to uniMenuButton's click event to trigger ArrowClick event and make whole button working as arrow. It's not working anymore. Can anybody help me how can i do this with new build. This is not working: JSAddListener('click', JSFunction('sender, e, eOpts', ' sender.fireEvent("arrowclick", sender, e, eOpts); ') ); Best Regards Project1.rar
  4. Hmm, DBGrid in her kolonu ayrı cell olarak yaratıldığı için mümkün değil. Bunu sadece örnek olarak koydum, belki ileride daha kapsamlı bir testeği unigui bize sağlayabilir. Ben kendi projelerimde seninle aynı şekilde bir yapıya ihtiyaç duyduğumdan kendimce bir yöntem geliştirdim. Grid üzerinde tek bir kolon bırakıyorum mesela ID kolonu. GetCellData event i içerisnde oluşturduğum json a bütün dataset sahalarını tanımlıyorum ve bu kolon un template inde kullanıyorum. Kendi kullandığım event kodunu göstereyim. function GetCellData(const ColNo: Integer; var HasAttr: Boolean): TUniCellRecord; var template : TaidCrossTemplate; mustache: TSynMustache; function ParseStrToHtml(AHtml : RawUTF8) : RawUTF8; begin Result := StringReplace(AHtml, '"', '\"', [rfReplaceAll]); Result := StringReplace(StringReplace(Result, #10, ' ', [rfReplaceAll]), #13, ' ', [rfReplaceAll]); end; function RecordToJSON(ADataSet : TDataSet) : RawUTF8; var I : Integer; begin Result := ''; if ADataSet.Active then begin Result := '{ '; for I := 0 to ADataSet.Fields.Count - 1 do begin Result := Result + '"' + ADataSet.FieldDefs[I].Name + '": "' + StringReplace(ADataSet.Fields[I].AsString, '"', '\"', [rfReplaceAll]) + '", ' end; Result := LeftStr(Result, Length(Result) - 2) + ' '; Result := Result + ' }'; end; end; begin Result := inherited GetCellData(ColNo, HasAttr); if FContextNo = 0 then begin FContextNo := DataSet.RecNo; FContext := RecordToJSON(DataSet); end; if FContextNo <> DataSet.RecNo then begin FContext := RecordToJSON(DataSet); end; template := TemplateByName(Columns[ColNo].FieldName); if template <> nil then begin mustache := TSynMustache.Parse(ParseStrToHtml(template.HTML.Text)); Result.Value := '"' + mustache.RenderJSON(FContext) + '"'; end; if FContextNo = DataSet.RecordCount then FContextNo := 0; end; Burada RecordToJSON ile oluşan yapı ile template içerisinde bütün dataset i Field isimleri ile kullanabilirsin. <b>{{Id}}</b><br /><span>{{TextFieldName}}, {{TimeFieldName}}</span> gibi. Umarım yardımcı olur.
  5. Hi everyone, With new uniGUI, GetCellData event became virtual and i just made a sample how to use it with a MVC like template system. You can learn (and download) about mustache and figure a way how to use it. This is just a basic sample. You must download mustache Delphi library from https://mustache.github.io/ I made a custom DBGrid, and names as TenDBGrid for this sample, enjoy. Best regards. TemplateSample.rar
  6. Hi, There is a function in TUniCustomDBGrid and it's triggerd for every cell on grid while creating content. I need to override it but it's not virtual. Can we get an event for this? or at least can it be a virtual so we can override and customize cell data what ever we like. Best regards
  7. Thanks but i know that method and it's not what i want. Because, i don't have any TField with my Query and it's all generated, also i am trying to use it with my custom made grid which has it's own source for data and one column and it's all custom build html text. I am looking for something grid related, not dataset related.
  8. Hi Everyone, Before jumping into TuniCustomDBGrid, i like to know if there is an easy way to change Row Content while listing with TUniDBGrid without changing data itself. It's created as html and i like to replace some text with values from an array. I need an event like RowCreated and need a parameter to get/set it's innerhtml. Best regards
  9. Hello, Deploying updates to unigui applications for several customers will be painfull with each unigui update. So, i am looking for an easy way to upgrade runtime libraries without using setup. First think came in my mind, maybe runtime package setup exe can support silent upgrade option from command prompt? I am open for any suggestions
  10. Exe bir windows uygulaması, dll ise IIS içerisinde çalışan bir servis. Web tabanlı hizmetlerin, win uygulaması gibi donanım erişim hakları yoktur, activex ile yapılabiliyor ama emin ol bulaşmak istemezsin. web sayfalarında yazıcı erişim çıktısı işlemi kullanılan tarayıcının desteği ile yapılıyor, direk yazdırma yapamazsın ama tarayıcının yazdır fonksyionunu jscript ile çağırabilirsin.
  11. you can't use beforeEdit event, i am not sure why but grid cancel editing automatically. And i can create a checkbox on runtime, it says "checkbox is not a constructor" etc. still working on it. if anyone can find a better solution for this please let us know, this is very critical issue for most developers i think.
  12. Hi, Maybe this will help you to do; procedure BaseGridAjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); var colIndex : Integer; begin inherited; if EventName = 'select' then begin colIndex := BaseGrid.ColumnByName('FieldValue').Index; case TFieldType of ftDateTime : begin UniSession.AddJS(BaseGrid.JSName + '.columnManager.columns[' + IntToStr(colIndex) + '].setEditor(' + ' new Ext.form.field.Date({' + ' id: ''' + BaseGrid.JSName + 'columnsEditor' + IntToStr(colIndex) + ''', ' + ' xtype: ''datefield'',' + ' format: ''d.m.Y'',' + ' anchor: ''100%'',' + ' })' + ' );'); end; ftInteger : begin UniSession.AddJS(BaseGrid.JSName + '.columnManager.columns[' + IntToStr(colIndex) + '].setEditor(' + ' new Ext.form.field.Number({' + ' id: ''' + BaseGrid.JSName + 'columnsEditor' + IntToStr(colIndex) + ''', ' + ' xtype: ''numberfield'',' + ' anchor: ''100%'',' + ' })' + ' );'); end; else begin UniSession.AddJS(BaseGrid.JSName + '.columnManager.columns[' + IntToStr(colIndex) + '].setEditor(' + ' new Ext.form.field.Text({' + ' id: ''' + BaseGrid.JSName + 'columnsEditor' + IntToStr(colIndex) + ''', ' + ' xtype: ''textfield'',' + ' anchor: ''100%'',' + ' })' + ' );'); end; end; end; end;
  13. Ok, never find. I found it from uniDateTimePicker class. I just looked to wrong class which is DBdatetime... Thanks anyway.
  • Create New...