Skip to forum content
My Visual Database
A Simple Solution for Creating Databases
You are not logged in. Please login or register.
Active topics Unanswered topics
Search options (Page 5 of 10)
DriveSoft wrote:thezimguy wrote:Hi Dmitry,
Please is it possible to also add a checkbox in the header of the tableGrid for selecting all rows?
Regards
You can place CheckBox on a Form with script
procedure Form1_CheckBox1_OnClick (Sender: TObject);
begin
if Form1.CheckBox1.Checked then Form1.TableGrid1.SelectAll else Form1.TableGrid1.SelectedRow := -1;
end;
Thank you so much boss.
Really appreciated.
Again, how do I make all the checkBox in the table checked when I click on the check all.
I mean instead of selecting all the row, the check boxes in each row should be checked and uncheck when I uncheck the check all checkBox
Thanks.
thezimguy wrote:Please have a look at this for me
The table rows are numbered according to it's offset and limit.
Everything works well but when you click on search and after that next, it does not function well.
Details
1. Run project
2. Click next button : the numbering will continue from 51 to 100. Also when you change the number of rows per page it works well.
3. Click on search: problem start
4. Click on next : the numbering is not able to continue on clicking next.
Regards
Still waiting on response to this post.
Thank you in advance.
Please have a look at this for me
The table rows are numbered according to it's offset and limit.
Everything works well but when you click on search and after that next, it does not function well.
Details
1. Run project
2. Click next button : the numbering will continue from 51 to 100. Also when you change the number of rows per page it works well.
3. Click on search: problem start
4. Click on next : the numbering is not able to continue on clicking next.
Regards
Hi Dmitry,
Please is it possible to also add a checkbox in the header of the tableGrid for selecting all rows?
Regards
Thank you
I have been able to figure it out.
procedure callForm(Form: TAForm);
begin
TdbEdit(Form.FindComponent('Edit1')).Text :='Worked';
end;
procedure Form1_Button1_OnClick (Sender: String; var Cancel: boolean);
begin
callForm(TAForm(TControl(Sender).Owner))
end;
I just had to change the Parent to Owner
Hello sibprogsistem,
Again, please see if you can help me with this
procedure callForm(Form: TAForm);
begin
TdbEdit(Form.FindComponent('Edit1')).Text :='Worked';
end;
procedure Form1_Button1_OnClick (Sender: String; var Cancel: boolean);
begin
callForm(TAForm(TControl(Sender).Parent))
end;
Details
............................
The project has a form(Form1), button (Button1), panel(Panel1) and Edit(Edit1)
The above code worked perfectly without a problem when the button is placed on the form but does not work when the button is inside the panel.
What I want is to get the parent of the button which is the form but not the panel.
Thank you
Hello Dmitry,
procedure Form1_OnShow (Sender: string; Action: string);
begin
Form1.TableGrid1.dbLimit := 10;
end;
procedure Form1_TableGrid1_OnChange(Sender: TObject; ACol, ARow: Integer);
var
i : integer;
rowFrom : integer = 0;
rowTo : integer = 0;
rowDBTotal : integer = 0;
begin
rowFrom := Form1.TableGrid1.dbOffSet + 1;//rTo := Form1.TableGrid1.dbOffSet + Form1.TableGrid1.dbLimit;
rowTo := Form1.TableGrid1.dbOffSet + Form1.TableGrid1.RowCount;
//rowDBTotal := Form1.TableGrid1.dbTotalRows;//Total rows from database and not from tableGrid(not RowCount)
Form1.lblRows.Caption := IntToStr(rowFrom) + ' to ' + IntToStr(rowTo) + ' of ' + IntToStr(SQLExecute('SELECT COUNT(ID) FROM employees'));
//so that instead of the above I will just do the following
Form1.lblRows.Caption := IntToStr(rowFrom) + ' to ' + IntToStr(rowTo) + ' of ' + IntToStr(rowDBTotal);
end;
Instead of
Form1.lblRows.Caption := IntToStr(rowFrom) + ' to ' + IntToStr(rowTo) + ' of ' + IntToStr(SQLExecute('SELECT COUNT(ID) FROM employees'));
It will be
Form1.lblRows.Caption := IntToStr(rowFrom) + ' to ' + IntToStr(rowTo) + ' of ' + IntToStr(rowDBTotal);
THE REASON FOR THIS IS I DONT WANT TO REQUERY THE DATABASE SINCE THE TABLEGRID HAS ALREADY QUERIED THE DATABASE ON UPDATE.
I mean that on tableGrid update or tableGrid load should come with the total rows from that query which should be attached to the tableGrid.
This will really help for the navigation through the table to be simplier and fast and will also reduce the number of queries to the database.
I hope to hear from you.
Regards
sibprogsistem wrote:TdbButton(Form.FindComponent('Button1')).caption:='Clicked';
Exactly what I needed.
Thank you all.
Really appreciated
Hello Dmitry,
Please how do I make this procedure work?
I have two forms (Form1 & Form2) and a button each (Button1) on each form.
I want this procedure to work for any form. Thus i want to reference any form and its controls in the procedure.
procedure callComponents(Form: TAForm);
begin
Form.Button1.Caption:='Clicked';
end;
procedure Form1_Button1_OnClick (Sender: String; var Cancel: boolean);
begin
callComponents(Form1);
end;
procedure Form2_Button1_OnClick (Sender: String; var Cancel: boolean);
begin
callComponents(Form2);
end;
Thank you.
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.
Thank you Father Christmas
Really appreciated
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.
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
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
You can still do it. I will send you another sample soon.
You can also do it without writing script. Check whether this helps
Add this line to also clear the new component RichEdit
IF Form.Components[i] is TdbRichEdit Then TdbRichEdit(Form.Components[i]).Clear;
Thank you once again Dmitry,
Based on your response I have been able to achieve restarting of the app with the following block of code
procedure Form1_btnRestart_OnClick(Sender: TObject; var Cancel: boolean);
begin
Form1.Close;
OpenFile(Application.ExeName);
end;
I think it may be useful to others.
Regards
gonpublic2k wrote:Hello MVD community, cheers!
I'm wondering if anyone has developed a point of sale software using MVD that is willing to share source code. I'm trying to learn to program
in that area but need guidance as to what to implement and how to do it. Greatly appreciated.
Thanks!
Please check the link below whether i will be of help to you
http://myvisualdatabase.com/forum/viewt … 949#p27949
Regards
gonpublic2k wrote:@theZimGuy - Is this a Point Of Sale project you're working on? From your screenshot I took a look and at a
glance it appears to be. Please let me know because I'm interested on developing one using MVD.
Cheers!
Please find attached.
To use this project, pls dont forget to create a mySQL database first.
You can install xampp and access it phpMyAdmin to do that.
Import the zims.sql after you create the database.
Provide the database settings when prompted.
Example
Server(Host) : localhost
Port : 3306
User : root (default)
Password : (empty default)
Database : zims (the name of the database you created)
Sorry for the delay
Pls Dmitry, when you hover the mouse over the RichEdit control, it's hint does not show. I know this is not a major issues but I just wanted you to know.
Regards
The component I'm talking about is in respect with this post
http://myvisualdatabase.com/forum/viewtopic.php?id=4447
derek wrote: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.
Hi Dmitry,
I wish a navigation component can be added to the tableGrid for (next, previous, etc)
Thank you.
Posts found: 101 to 125 of 247