1

(1 replies, posted in General)

Hello Dmitry,

I have a little Problem with my project, may you could have a short look on it?
In the Project there is a table (Bearbeiter) which are select by drobdown. Now I need two dropdowns with referenced to this table.
one field with name “eröffnet” and the second field with name “erledigt”. These two column should be shown in the retoure grid Form1 above and below and saved at the input “frmBearbeiter”

I have tried to create a new dropdown in the Database tables with “Realtionship” , but it seems that it doesn´t work. I select in frmRetoure the “eröffnet” and a different at “erledigt”. In the table there is in both column shown the name of the “eröffnet”.

What is the error?

Other question:
Is it possible now to click on the column heads and sort the list? Regrettably until now, sorting is possible but after a few seconds the sort criteria gets lost 

Very best regsards.

Markus

2

(6 replies, posted in General)

Hello Dmitry,

I just set the visebility to hidden on the mentioned field.. that's what I'm looking for.

Regarding the sorting fix, that would be great cause this is quite annoyingly and when you have a lot entries in the list very difficult to find something.
Please let me know if you have a update on this sorting thing.

Many thanks
and cheers
gieri

3

(6 replies, posted in General)

Hello Dimtry,

thanks for the sample. The search seems to work. Do you solve this via script. Can I delete the search field and button above the tablegrid2?
Regrettably the sorting is still switching back to something after a few seconds in both grids. :-(

Any chance to fix the sorting by cklicking the column header?

Cheers
gieri

4

(6 replies, posted in General)

upps... sorry.

5

(6 replies, posted in General)

Hello Dmitry,

hope you can help me. I have 2 tablegrids in one form and need to search inside the grids. I  copied the fields and the search for the tablegrid 1 and create a second searchbutton which should search inside the tablegrid2. Regrettabbly, only the grid1 takes effect.

Is it possible to search both grids wiht one serach an show each match in there tablegrid?

Another problem is the sorting of the grids. Cause I have a refresh timer of the grid view (each second), the sort is always mixed up. When I set a default sort in the grid for one column and I click on another column to sort for something, the view is also mixed up again.
Best way for me, would be "no sorting" and I do the sort if I need it by clicking on the column head, but as I mentioned, the tablegrid is sorted after 1 second but I don´t know on which critaria. this Problem is also on tablegrid2.

Attached is the Project file.

Hope you could find some solution.

Cheers
gieri

6

(2 replies, posted in General)

Hello Dmitry,

now works fine, thank you very much for your support!

Cheers

gieri

7

(2 replies, posted in General)

Hello,

I like to fill a column with check box values. Which kind of data field I need for the TableGrid to right in the value of the check  box  I tick?

I set a TEXT field under Database tables and add some checkboxes and relate the them with "TableName" and "FieldName".
When I tick a check box, the is no content stored in the column. Is the a special option in the Check Box Properties where I have to set the Content (name) which will show in the Column?

Current I get ony a "1" or a "YES" in this column ... depends on the field type.
For better Understand, attached  the Project file.
In frmRetoure are the check boxes "Bearbeiter" which should displayed in the TableGrid1 and TablGrid2 in the column "Bearbeiter" as Name and not as Value "1" or "YES"

Thanks for any hint.

gieri

8

(22 replies, posted in General)

Hi Dmitry,

did you have a solution to solve my last two problems?

Thanks for any respons.


Cheers

gieri

9

(22 replies, posted in General)

Hello Dmitry,

also another behavior which I can´t solve.
When I search something, the Search is  configured that both Grids are involved. But when I search something, the TableGrid2 gets no hit but the content is there.

Also the sort in TableGrid2 get lost after a few seconds. I sort by Name (click on the column head) and after 3 Seconds the list is mixed up

Cheers

gieri

10

(22 replies, posted in General)

Hello Dmitry,

thanks for that hint. Now the search problem is fixed. How about the TableGrid behavior? Do you have a solution for that?

Cheers
gieri

11

(22 replies, posted in General)

Hello Dmitry,

found out that the TabelGrid1  also lost its column order when I type something into the search. Suddenly all Columns are shown.

Cheers

gieri

12

(22 replies, posted in General)

Hi Dmitry,

thanks for the sample. Regrettably the problem still exist. When i click after the first start into the TabelGrid2 ... the Columns of TableGrid1 will rearranged similar to TableGrid2.

Cheers

gieri

13

(22 replies, posted in General)

Hello Dmitry,

sorry, just still have a little issue :-(
I display not all Columns in my TableGrid1 (above) and sort the grid Descending on the column ".added".

On the first start of the app, everything looks good. When I make a Mouse click into the TableGrid2 (below). The TableGrid1 is mixed up, lose the sorting and all hided Columns are displayed. How can I fix this?

Also the Column width is lost very often. Is there a parameter where I can make the Column width fix?

Project zip attached.

Cheers

gieri

14

(22 replies, posted in General)

many Thanks. Works 100%

cheers

gieri

15

(22 replies, posted in General)

Hello Dmitry,

just have a quick question how to get the update thing to the other tablegrid in my DB?
The scriptcode just have TableGrid1, but I have the other Grid with TableGrid2 in the same window. Is it possible to update both grids at the same time?

Cheers

gieri

16

(22 replies, posted in General)

Hello Dmitry,

thanks for your help. Now it works very good!

Have a nice weekend ;-)

Cheers

gieri

17

(22 replies, posted in General)

Hello Dmitry,

thanks for the file. The refresh works now very good. Regrettably after a refresh, the table focus jumps to the first entry.
So if you have for example 50 entries, after 5 second the table view jumps to the first.

Is there any chance to fix this?

cheers

gieri

18

(22 replies, posted in General)

DriveSoft wrote:

gieri
Please attach your project. Zip file without exe and dll files.

see attached..

cheers

gieri

19

(22 replies, posted in General)

Hello Dimitry,

thanks for the sample. In fact of I don´t have any clue how to work with scripts, I don´t know if I can add you code to my existing code which I need to get a multiselction of the rows.

Current it looks like this:

procedure Form1_Button3_OnClick (Sender: string; var Cancel: boolean);
var
   i,c: integer;
   iColumn: integer;
begin
   iColumn := Form1.tablegrid1.Columns.Count-1; // in last column stored id of record (last column hided)
   c := Form1.tablegrid1.RowCount - 1; // count of records in TableGrid
   for i :=0 to c do
     if Form1.tablegrid1.Selected[i] then // if record selected
        SQLExecute('DELETE FROM retoure WHERE id = ' + Form1.tablegrid1.Cells[iColumn, i]); // SQL query for selected record
   form1.tablegrid1.dbUpdate;
end;

begin
   form1.TableGrid1.Options := form1.TableGrid1.Options + goMultiSelect;
end.

var
   Timer: TTimer;

procedure Form1_OnShow (Sender: string; Action: string);
begin
     Timer := TTimer.Create (nil);
     Timer.OnTimer := @OnTimer;
     Timer.Interval := 5000; // every 5 sec
     Timer.Enabled := True;

end;

procedure OnTimer;
begin
     Form1.tablegrid1.dbUpdate;
end;

procedure Form1_OnClose (Sender: string; Action: string);
begin
     Timer.Free;
end;

but it doesn´t work.

What have I made wrong here?

cheers

gieri

20

(22 replies, posted in General)

Hello,

when I start my app on several Workstations I can see only "my" entries in the grid. Only when I close, restart or make a new entry, the grid gets an update and I can see the changes from the other workstation.
Is it possible to set an interval which update the grid automatically? So every 5 seconds the grid gets an update and all open sessions can see the current entries?

Thanks for any hint.

cheers

gieri

21

(12 replies, posted in General)

derek wrote:

6)
You can add counters to tablegrid by using the tablegrid settings (where you add the column, column headings etc - click  'footer' and select 'count' option

Hello derek,
that´s awsome!! Thanks a lot for your help.

I use in TableGrid1 in the Footer (Count) the Label Text before "Summe:X"
In TableGrid2 in the Footer (Count) the Label Text before "Erledigt:X"

When I click in TableGrid2, the Text before in TableGrid1desapears and only the counted number is left there. When I close and open the App again, the "Text before" Counter in TableGrid1 is back again. I think this is more like a bug, isn´t it?

Can define the Style which I use for the Heads also to the footer? Office210 for example?

cheers

gieri

22

(5 replies, posted in General)

Hello derek,

thank you for your great help!

cheers

gieri

23

(12 replies, posted in General)

tcoton wrote:

Could you please post your project as zip file without the .exe and .dll in this topic to have a look?

Hello Tcoton,

see attached. As I mentioned, If you have a bunch of entries and you click on one, all other entries disappear. May something is wrong in fact of the script code?

Also the list of the grid doesn´t update automatically. I have to push the Search button twice to see the whole list.

Just on little question left, how could I crate a counter which shows how many entries are in the list.

Cheers

gieri

24

(12 replies, posted in General)

tcoton wrote:

Did you download the example project to see how it works? smile

Hello tcoton,

OK, after some playing around with the sample I´m sure I have made all configs similar in my project. Regrettably it doesn´t worked the same as in the sample.

When I have a bunch of entries and I click just on one entry, all other rows are disappear. Do you have an idea what happened here?
Also I still have the problem that after delete all entries, the ID will not reset to 0 when I add some new entry
It seems that my grid will not auto refresh when I have made a new entry with the entry form... is there a option to make this grid autofresh?


Cheers

gieri

25

(5 replies, posted in General)

derek wrote:

Hello Gieri,
Both approaches are possible;  it just depends how you want to display the information.
A quick and very easy way to do it without having to write any script and without having to set up an archive table, is to use 2 grids, each grid being filtered according to whether the 'todo' has been finished or not.
I have attached a small example for you.
Hope this gives you some ideas.
Derek

Hi derek,

thanks a lot, your sample was very helpful! I just made it  like you advised and it works like a charm ;-)

cheers

gieri