Re: [SOLVED] TagbleGrid, Pagination, Footer and Offset
Thank you Derek for your kindness,
It is perfect for what I want to achieve.
My Visual Database → General → [SOLVED] TagbleGrid, Pagination, Footer and Offset
Thank you Derek for your kindness,
It is perfect for what I want to achieve.
Hello Dmitry, Derek and MVD users,
Please I have another question
Is there a way to catch the actions of a button
Example
.............
I have a button with action [SAVE RECORD]
if I click on the button, I want to know whether it is for saving or updating
Example
procedure btnSaveOnClick(Sender:TObject; var Cancel:Boolean; Action:String);
Begin
Showmessage(Action);
End;
I want to catch the action before deciding whether to save or not
Thanks
procedure Form2_btnSave_OnClick (Sender: TObject; var Cancel: boolean);
begin
If Form2.dbAction = 'NewRecord' then ShowMessage('Adding a New Record.');
If Form2.dbAction = 'ShowRecord' then ShowMessage('Updating a Record.');
end;
procedure Form2_btnSave_OnClick (Sender: TObject; var Cancel: boolean); begin If Form2.dbAction = 'NewRecord' then ShowMessage('Adding a New Record.'); If Form2.dbAction = 'ShowRecord' then ShowMessage('Updating a Record.'); end;
Thank you so much. I really appreciate your help.
It works perfectly
Also, if you want to prevent the record from saving you can put in
Cancel := True;
I usually will follow it with an Exit; to leave the procedure immediately;
Hello,
Please what am I doing wrong?
I'm trying to filter a Table Grid with text from an EidtBox,
Can I include EditBox Text in the Filter of the TableGrid?
Any Help?
Regards
You only need the part after the WHERE clause to filter. It looks like in your case that it should be privPage.id_user = {edUserId}
Thank you bro, but it's till not working for me.
I'm getting this error
Error message: unrecognized token: "{"
I'm grateful
Regards
My apology. I typically do not use the filter in the tablgrid settings. I usually use SQL Query where you can use form fields in the sql. The form field needs to be placed within the braces inside single quotes ( '{edUserId}' ). I don't believe you can place edit fields in the filter box of the tablegrid settings.
Thank you for the information
thezimguy
You can't use values of component in this field "3. Filter"
But you can change this filter by script, example:
procedure Form1_Edit1_OnChange (Sender: TObject);
begin
Form1.TableGrid1.dbFilter := 'privPage.id_user = (SELECT user.id FROM user WHERE user.users="'+Form1.Edit1.sqlValue+'")'
end;
Thank you Dmitry,
I really appreciate the information given
Regards
Hi Dmitry,
I wish a navigation component can be added to the tableGrid for (next, previous, etc)
Thank you.
Hi,
I don't know if table navigation is to be included as a standard component in the next version but you can navigate through a tablegrid by using a script; please have a look at the attached example.
Regards,
Derek.
Hi,
I don't know if table navigation is to be included as a standard component in the next version but you can navigate through a tablegrid by using a script; please have a look at the attached example.
Regards,
Derek.
Thank you Derek.
I already have the script version of it and wish that it would be added to the current veraon as a standard component.
The component I'm talking about is in respect with this post
http://myvisualdatabase.com/forum/viewtopic.php?id=4447
Hello Dmitey,
Please can you add the dbLimit to the property window of the tableGrid?
So that we can set the default limit without coding.
And I wish a navigation control will be added to the tableGrid soon. Thank you.
Regards
Also, does the tableGrid got a property for total records in the database table?. I know we can query the database for that but I was wondering if it has already that property.
Thanks
The attached shows a tableGrid with pagination (first,previous, next and last)
I have added the code for the first three.
What will be the best code for the last button.
Regards.
Hello Dmitey,
Please can you add the dbLimit to the property window of the tableGrid?
So that we can set the default limit without coding.
Done.
Please download latest beta version
https://www.dropbox.com/s/anufoqnsh809x … a.zip?dl=0
Also, does the tableGrid got a property for total records in the database table?. I know we can query the database for that but I was wondering if it has already that property.
Thanks
You can get count of rows in the TableGrid
Form1.TableGrid1.RowCount
The attached shows a tableGrid with pagination (first,previous, next and last)
I have added the code for the first three.What will be the best code for the last button.
Regards.
procedure Form1_btnLast_OnClick (Sender: TObject; var Cancel: boolean);
var
qRecords: integer;
begin
qRecords := SQLExecute('SELECT COUNT(ID) FROM employees');
Form1.GridEmployees.dbLimit := StrToInt(Form1.cbPages.Text);
Form1.GridEmployees.dbOffSet := qRecords - Form1.GridEmployees.dbLimit;
Form1.GridEmployees.dbUpdate;
end;
Thank you Father Christmas
Really appreciated
Again Dmitry,
I wish this feature will added to the tableGrid for easy alignment of column cells.
Find attached image below
It will be very nice to align the columns without having to write code.
Thank you.
Again Dmitry,
I wish this feature will added to the tableGrid for easy alignment of column cells.
Find attached image belowIt will be very nice to align the columns without having to write code.
Thank you.
This will be great addition to the tableGrid.
I wish Dmitry will consider this and add it early for us.
Nice idea
My Visual Database → General → [SOLVED] TagbleGrid, Pagination, Footer and Offset
Powered by PunBB, supported by Informer Technologies, Inc.
Theme Hydrogen by Kushi