Jump to content

gerardocrisci

uniGUI Subscriber
  • Posts

    161
  • Joined

  • Last visited

  • Days Won

    6

gerardocrisci last won the day on October 21

gerardocrisci had the most liked content!

Profile Information

  • Gender
    Male

Recent Profile Visitors

1541 profile views

gerardocrisci's Achievements

Active Member

Active Member (3/4)

40

Reputation

  1. I am a member since 01/31/2015 and have recently renewed the license. I did it just to be able to compile with Delphi 11. I know the initial developments of this excellent UNIGUI In recent years there have been no major developments ... and now you understand why .. and my concerns were well-founded, outlined in several posts. Today I am even more afraid than before .. knowing that only Farshad has the core sources. I wish a long life to Farrshad .. on which we depend. In the latest roadmap .. you write that you would publish more sources. I asked to include all sources in the most expensive version .. and we will all be calmer.
  2. I found the problem procedure TUniCustomDBGrid.HookFilter(ASet: Boolean); ... begin if FDataLink <> nil then if (DataSource <> nil) and (DataSource.DataSet <> nil) then begin Ds := DataSource.DataSet; if ASet then begin ... if (...) then begin ... FSaveFilter := Ds.OnFilterRecord; Ds.OnFilterRecord := H_OnFilterRecord; end; end .... the change of OnFilterRecord notified after locate returns the cursor to the first record.. Just start "HookFilter" before "Locate" So it would be enough UniDBGrid1.HookFilter(True); MyQuery1.Locate('Country_ID', 5, []); but HookFilter is private and not directly accessible .. So to start it just confirm the Datasource SetDataSource(Value: TDataSource); --->HookEvents(True); ---> HookFilter(True); UniDBGrid1.DataSource := MyDataSource1; MyQuery1.Locate('Country_ID', 5, []); it is therefore easy to create an adjustment that functions any library to access the data. 😀😀😃 I am happy
  3. Hi, trying I have this sequence: The database after locate is on the right record! the first "NotifyAjax" from the unidbgrid .. lead to the right position. .. I read the value 4 in Datasource.DataSet.RecNo the next "NotifyAjax" .. in unit uniDBGrid; procedure TUniCustomDBGrid.NotifyAjax; --> HookEvents(True); ---> HookFilter(true); does so to modify the DataSet.OnFilterRecord FFilterHooked := True; FSaveFilter := Ds.OnFilterRecord; Ds.OnFilterRecord := H_OnFilterRecord; ... and Datasource.DataSet.RecNo returns to the value 0 if i impose this fix .. i don't have the problem. // HookFilter(ASet); HookFilter(False); Not using filters on the grid ...can I apply this correction?? .. What happen? I know this is not the right solution .. ... but someone tells me if he has the same problem ..and if it has a solution. Thank you and I await a reply
  4. First I tell you Thanks for your answers Your example works ... but I haven't solved the problem😭 If you move Country: TMyQuery and dsCountry: TMyDataSource on Form1 ... the cursor after Locate stays on the first record. Try and let me know. if the Dataset and the Grid are on the same form .. the problem occurs. You want to check GRAZIE🙂
  5. I don't use a Frame but a MainForm and the query is on the Form ... try my example .. i use the latest version of MyDAC and the problem is there! Please, create my example and try.
  6. Have you done the test with MyDAC?😱 With FireDAC or ODBC or whatever it works. From the example it is not a question of variable, the record finds it but does not display it.
  7. DFM object MyQuery1: TMyQuery Connection = MyConnection1 SQL.Strings = ( 'select * from country') Active = True Left = 180 Top = 125 end This is in the example ... but you can open it wherever you want .. the problem is the positioning of the row in the grid after the initial locate.
  8. simple example Mainform with MyConnection1, MyQuery1, MyDataSource1 Main.pas unit Main; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, uniGUITypes, uniGUIAbstractClasses, uniGUIClasses, uniGUIRegClasses, uniGUIForm, uniLabel, uniButton, uniGUIBaseClasses, uniBasicGrid, uniDBGrid, Data.DB, DBAccess, MyAccess, MemDS; type TMainForm = class(TUniForm) MyConnection1: TMyConnection; MyQuery1: TMyQuery; MyDataSource1: TMyDataSource; UniDBGrid1: TUniDBGrid; UniButton1: TUniButton; UniLabel1: TUniLabel; procedure UniButton1Click(Sender: TObject); procedure UniFormAfterShow(Sender: TObject); private { Private declarations } public { Public declarations } procedure MySearch(V:string); end; function MainForm: TMainForm; implementation {$R *.dfm} uses uniGUIVars, MainModule, uniGUIApplication; function MainForm: TMainForm; begin Result := TMainForm(UniMainModule.GetFormInstance(TMainForm)); end; procedure TMainForm.MySearch(V:string); begin if MyQuery1.Locate('country_id',V,[]) then UniLabel1.Caption:='FOUND :'+V; end; procedure TMainForm.UniFormAfterShow(Sender: TObject); begin MySearch('4'); //Finds the record, but does not display it in the grid end; procedure TMainForm.UniButton1Click(Sender: TObject); begin MySearch('5'); //Find the recod and it is displayed in the grid. end; initialization RegisterAppFormClass(TMainForm); end. Main.dfm object MainForm: TMainForm Left = 0 Top = 0 ClientHeight = 299 ClientWidth = 635 Caption = 'MainForm' OldCreateOrder = False MonitoredKeys.Keys = <> OnAfterShow = UniFormAfterShow PixelsPerInch = 96 TextHeight = 13 object UniDBGrid1: TUniDBGrid Left = 20 Top = 25 Width = 386 Height = 246 Hint = '' DataSource = MyDataSource1 LoadMask.Message = 'Loading data...' TabOrder = 0 end object UniButton1: TUniButton Left = 435 Top = 90 Width = 75 Height = 25 Hint = '' Caption = 'UniButton1' TabOrder = 1 OnClick = UniButton1Click end object UniLabel1: TUniLabel Left = 440 Top = 130 Width = 46 Height = 13 Hint = '' Caption = 'UniLabel1' TabOrder = 2 end object MyConnection1: TMyConnection Database = 'sakila' Username = 'root' Server = 'localhost' Connected = True LoginPrompt = False Left = 440 Top = 20 EncryptedPassword = '' end object MyQuery1: TMyQuery Connection = MyConnection1 SQL.Strings = ( 'select * from country') Active = True Left = 180 Top = 125 end object MyDataSource1: TMyDataSource DataSet = MyQuery1 Left = 260 Top = 125 end end at startup it does not go to record # 4 this does not work with MyDAC
  9. But have you tried? However... in OnCreate or OnShow or OnAfterLoad .. it doesn't work for me
  10. I have a problem using MyDAC (10.4.4) with UNIGUI. When using Locate before displaying the form, the record selected on the uniDBgrid is always the first, the cursor does not move. If the same operation is done at the click of a button ... the cursor moves ... and it works. procedure TMainForm.MySearch(V:string); begin if MyQuery1.Locate('ID',V,[]) then UniLabel1.Caption:='FOUND :'+V; end; procedure TMainForm.UniFormAfterShow(Sender: TObject); begin MySearch('12'); //Finds the record, but does not display it in the grid end; procedure TMainForm.UniButton2Click(Sender: TObject); begin MySearch('30'); //Find the recod and it is displayed in the grid. end; With this problem I cannot select the record before the unidbgrid is displayed. Do you have a solution?
  11. Hi mikromundo, even if I haven't tried it .. your solution looks good ... it interfaces with UniGUI ... but it's not integrated in UniGUI. We pay for the use and development of UniGUI ... and every time we ask to integrate the responsive layout ... currently there is still no planning of when it will be done (reliable). But this also applies to other requests .. we do them ... but not quick answers. Lately UniGUI has developed a more commercial aspect (website, webinar, ..), slowing down the development of components considerably. Everything must be evaluated .. even with what tools we can create our new projects ...
  12. for Responsive layout: I have not tried it ... it seems a functional solution .. but it is not the one required .. the solution must be created by UniGUI on the basis of ExtJS developments https://docs.sencha.com/extjs/7.2.0/modern/Ext.Responsive.html using Ext.Responsive and responsiveConfig for object Ext.define('MyApp.view.main.Main', { extend: 'Ext.container.Container', mixins: [ 'Ext.mixin.Responsive' ], responsiveFormulas: { small: 'width < 600', medium: 'width >= 600 && width < 800', large: 'width >= 800' } }); and responsiveConfig: { small: { hidden: true }, medium: { hidden: false, region: 'north' }, large: { hidden: true, region: 'west' } } the renewal of the license is also for this purpose and not to use the "Hint" property and follow the developments of others (...even if the RADCORE project is an excellent alternative ... congratulations!). And I await the development of the other characteristics requested by all of us ...
×
×
  • Create New...