-
Posts
177 -
Joined
-
Last visited
-
Days Won
7
Content Type
Profiles
Forums
Events
Posts posted by gerardocrisci
-
-
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 enoughUniDBGrid1.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
-
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.RecNothe 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
-
8 minutes ago, mierlp said:
You have to choose the approach that suits you and your application
I only agree on this ...
-
6 minutes ago, mierlp said:
Having Query and datasets available on a form has no added value, it's the wrong approach for database development.
I do not agree!
thanks
-
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🙂
-
1 minute ago, mierlp said:
Test with MyDAC
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. -
13 minutes ago, mierlp said:
Make sure that the variable you use is of type integer!
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.
-
2 hours ago, mierlp said:
So ....set the TMyQuery.FetchAll property to True;
and see if it changes the behavior.By default TMyQuery.FetchAll is true
-
8 hours ago, Abaksoft said:
I can't see MyQuery1.open
Where do you open your DataSet ? OnCreate event ?
DFM
object MyQuery1: TMyQuery
Connection = MyConnection1
SQL.Strings = (
'select * from country')
Active = True
Left = 180
Top = 125
endThis 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.
-
1 hour ago, Hayri ASLAN said:
Can you please create a test case?
simple example
Mainform with MyConnection1, MyQuery1, MyDataSource1Main.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 -
But have you tried?
However... in OnCreate or OnShow or OnAfterLoad .. it doesn't work for me -
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?
-
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 ...
-
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 objectExt.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 ...
- 1
-
if not all sources are available .. and the development of UniGUI is interrupted ... an event that can occur .. the risk is to rewrite our projects... beyond the various limitations already explained.
For the RoadMap everyone asks for the Responsive Layout
(It was foreseen in the uniGUI Roadmap - 2019 for Q2 / 2019).. in addition to this ..
- more integration with mobile gestures and more drag and drop,
- slide panel (menu),
- integrate a customizable REST WebService,
- a component to customize a theme,
- Screen Mask on HandleEvent (mouse or key) waiting for the request is completed
-
3 hours ago, Tokay said:
The Lazarus/FPC support
Expected in the RoadMap 2019
but for FPC support you need to include uniGUI Core source code ...
that they have no intention of doing ...
I have already written: this is a lack and a risk -
On 12/17/2020 at 5:19 PM, rgreat said:
5. More units with source code.
There are too many units without source ...and without sufficient information
uniGUIClasses, .. uniGUIForm, uniGUIConst, .. uniGUIBaseClasses,.. uniGUImClasses, uniGUImForm ... uniImageList .. etc etc
It takes at least a detail of the various object definitions
publish (for full version ) at least part of the text between "interface" <--> "implementation"it's a lack ..
all this creates difficulties to those like me who want to implement properties and methods and create their own components.
Finally .. not having all the sources .. is a risk for those who focus their resources and projects on UniGUI.Buone Feste e Buon 2021.
- 2
-
procedure TMainForm.UniFormAfterShow(Sender: TObject); begin OnAfterShow := nil; UniMemo1.Lines.Add('--- > OnAferShow'); end;
more simple and linear
- 1
-
Given that I do not understand why not have the source of all the files ...
where the pas source is not provided ...
give only the definition part of interface .. -
1 minute ago, Sherzod said:
Fixed, please wait for the next build.
Grazie .
Also think about giving documentation in int files..
if you provide the files uniImageList.int .. uniCanvas.int .. uniGUIForm.int ..
facilitates the ability to create custom components
trying to create override procedures ..I will wait for a next version soon
-
Ciao Freeman35
I need this adjustment ...
in many cases I start the Query in this event .. in order to display the form first and then the request for the data for the grid.
Is there a post-show event even after the AftherShow?PS:
Since it cannot be obtained even by paying uniGUIForm.pas.
At least is it possible to have uniGUIForm.int ?
an .int file where you only see the Interface part of Unit not shipped with source,.. example of the probable file:
unit uniGUIForm; interface uses Controls, Classes,...; type TUniForm = class(TUniCustomForm) private FOnReady: TNotifyEvent; .. protected function GetOnShow: TNotifyEvent; virtual; procedure OnAfterShow(Value: TNotifyEvent); override; ... public constructor Create (AOwner: TComponent); destructor Destroy; ... published property OnCreate; property OnReady; property OnBeforeShow; property OnShow; property OnAfterShow; ... end; implementation end.
-
but I think you could already understand from the title ..
thanks ..
good night
-
uni-1.90.0.1531
but your image shows a form ... not a MainForm in Windowlesslook at my picture
-
7 minutes ago, Sherzod said:
Yes
what does it mean?
Is there or isn't there an error?
Does an extension of the UniGUi license makes sense at all?
in uniGUI Mobile
Posted
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.