Gabriel
-
Posts
66 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by Gabriel
-
-
Hi. I was able to clean the filter from a TButton by simple iterate over them and set the text to ''. But a strange things happen.
Lets say I filter the first column with the value 1. Works like a charm. Now, I use the UniButton to clear all the filter and refresh the grid. Also Works like a charm. The issue begin when I want to set the filter to the first column again, if I put a value different from the original value I entered (1 in this case) it works, but if I use 1 again, it doesn't work until I type another value.
Is like the filter keep remembering the original value and the event doesn't get executed.
-
Hi,
Can you check it once again ?!
Because it should work
Best regards,
I will.
¿I have to specify anything special in the conection? ¿Could you see the code that I upload?
FDQuery does not have the method ADOQuery1.Requery;, as used on the example. I have to use either TAdsConnection or FDConnection
Please. Help!
Regards
-
I've tried everythig, and still can't refresh the data grid.
the only thing that works was closing the connection, and then open it again, like this:
procedure TMainForm.UniDBGrid1ColumnFilter(Sender: TUniDBGrid; const Column: TUniDBGridColumn; const Value: Variant); begin if UniMainModule.AdsQuery.Active then begin UniMainModule.ADsQuery.Params.ParamByName(Column.FieldName).Value := '%'+Value+'%'; UniMainModule.AdsConnection1.Disconnect; UniMainModule.AdsQuery.Open; end end;
So, basically, the problem is with the connection.
Also tried with FdConnection and FDQuery, same issue.
¿Does anyone have a working example with FDConnection? using Filters?
Regards
-
If I use
UniMainModule.AdsQuery.SQL.Clear; UniMainModule.AdsQuery.SQL.Add('Select * from elPersonas where Empleado <=500'); UniMainModule.AdsQuery.Open;
The query is executed and the DbGrid updated, almost instantly. So the issue must be with the params definition.
-
-
UniMainModule.AdsQuery.Refresh;
And remember UniDBGrid1.Columns[x].Editor = an uniedit field placed in a uniHiddenPanel.
As i said, I also try Closing, and Opening the Query, Refreshing it. But nothing seems to work.
-
Hi,
I'm using an AdsQuery to populate a data from and Advantage Database, wich works great. But I'm Having problem filtering the data (I'm trying to make the same thing as the GridFilter example, but with an AdsQuery).
I Just can't refresh the query.
This is my code on the UniDbGridColumnFilter event
procedure TMainForm.UniDBGrid1ColumnFilter(Sender: TUniDBGrid; const Column: TUniDBGridColumn; const Value: Variant); begin if UniMainModule.AdsQuery.Active then begin UniMainModule.ADsQuery.Params.ParamByName(Column.FieldName).Value := '%'+Value+'%'; UniMainModule.AdsQuery.Open; end end;
I also try Closing, and Opening the Query, Refreshing it. But nothing seems to work.
Regards
Gabriel
UniDbGrid - Clean Title Filter Columns from Button
in General
Posted