Page 1 of 1

Inserting row into table if table not in focus

Posted: Tue Oct 23, 2007 10:53 am
by Axel
How I can insert one or more rows into table, if cursor currently at another item? Cell not focused. ItemNo is known.

Posted: Tue Oct 23, 2007 12:05 pm
by Sergey Tkachenko
The code is the same as for modifying table at the caret position:

Code: Select all

var Data: Integer;

rve.BeginItemModify(ItemNo, Data);
with rve.GetItem(ItemNo) as TRVTableItemInfo do
  InsertRows(RowCount, 1, RowCount-1);
rve.EndItemModify(ItemNo, Data);
rve.Change;