Table adding rows at runtime in RichView

General TRichView support forum. Please post your questions here
Post Reply
BernhardRoos
Posts: 104
Joined: Mon Nov 26, 2007 1:49 pm

Table adding rows at runtime in RichView

Post by BernhardRoos »

Hello,
I want solve following. In RichViewEdit the user has only insert a table with one row and placeholders in cells.
Now at runtime I want to add so many rows as recordcount in a db table.
Is there a example to do this?
I have tried to do following :

table := TRVTableItemInfo(RVData.GetItem(i));

For u := 0 to (tTabelle.RecordCount-1) do begin
table.Rows.Add(table.Rows[0].Count);
...
end;

But if I print it I get the error : Index out of bounds (but the table rows are printing). What do I wrong?

Best wishes
Bernhard
BernhardRoos
Posts: 104
Joined: Mon Nov 26, 2007 1:49 pm

Post by BernhardRoos »

Another question.

Is it possible in a TRichView at runtime a table cell from one table to clone (all items) in another cell from another table?

Best wishes
Bernhard
Sergey Tkachenko
Site Admin
Posts: 17566
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

1.

Code: Select all

table.InsertRows(table.RowCount, Count, table.RowCount-1);
RichView1.Format;
2. Do you want copy cell to cell or row(s) to row(s)? Do the source and the target are in the same table? or different tables in the same RichView? or in different RichViews?
Post Reply