Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 8 Jahren, 3 Monaten
Letzter Beitrag:
vor 8 Jahren, 3 Monaten
Beteiligte Autoren:
Arie, DerekT, Al

WD14 detect click on header on table with breaks

Startbeitrag von Arie am 25.03.2010 15:30

I'm using a table with breaks and initially all break are collapsed. The user sees "orders" and can expand every order to see orderdetails.
When I doubleclicks on one of the breaks, I want to close the window and return the orderid.
No matter which breakheader is choosen, the selected row of the table will be row one. Instead of the first row of that particular section. Which would give me the option to get the required orderdetailID. Which in turn can be used to find the orderID.

It seems to me that break-headers are not objects as such, but are just drawn on screen whenever a break is detected.


Unfortunately I do not have an answer for you.
I played quite a bit with Tables and Breaks and found that it seemed that for all pratical purposes they are just a display option.
Maybe in v15 they will have been improved!!!!!!!!!

I am using TreeviewTables to achieve the results I required.
Sometimes they require a bit more programming (code) but in general allow all that the Table with Breaks promised but as yet have not delivered.

Just an opinion.



von DerekT - am 25.03.2010 16:35
I used some grid controls in Delphi. Back in the 90's (Delphi4) they were even better than in WD14. At least when it comes to grouping.

BTW: Can I color inidividual rows, in a treeview table? To visualize headers?

von Arie - am 25.03.2010 16:42
Hello Arie & Derek

I would have to agree about the table break, I was quite dissapointed with them, it seems they are just a piece of marketing fluff with no real functionality, the breaks won't even sub total currency fields.

In terms of of row coloring, the brushcolor will change a row color and you could trigger it off the subscript value of the heading rows or maybe have an indicator value in a hidden column.



von Al - am 25.03.2010 17:38

Yes you can.....

Everything you can do with a table can be achieved in much the same fashion in a Treeview Table.

To set a row as a 'Break'.........

MyRowNum is TableAddChild(MyTvt,Null,Val1,Val2,Val3,etc etc)
FOR i = 1 TO ColumnCount
MyTvt[MyRowNum]..Merge = MergeNextCell
MyTvt[MyRowNum]..Bruchcolor = DarkRed

As I said you may need a bit more code - setting the Open and Closed images and stopping unwanted actions occuring when clicking your 'Break' line but overall it works very well.



von DerekT - am 25.03.2010 18:51
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.