08-08-2011 04:35 AM
Hello,
I have a table with more columns than can be simultaneously displayed, so if the user is interested in one of the last columns, one has to use the vertical scrollbar.
Now the table is continuously populated with new data. These are added in a new row at the end of the table, and to allow reading the current data, I programmatically set the last row to be the active row using SetActiveTableCell (); this, however, is a problem because I need to specify a cell, ideally I would like to only specify a row - is it possible? Since I have not found a solution except SetActiveTableCell I also choose a column: If I choose say the first column then the vertical scrolling of the user will be reset on the next table update.
Suggestions are welcome, thanks!
Wolfgang
Solved! Go to Solution.
08-08-2011 07:19 AM - edited 08-08-2011 07:20 AM
Don't know if this modifies also the column, but you can try with SetCtrlAttribute (..., ..., ATTR_FIRST_VISIBLE_ROW, index);
You could also save the leftmost visible column with the corresponding GetCtrlAttribute and ATTR_FIRST_VISIBLE_COLUMN attribute and restore it after changing the row.
08-08-2011 08:03 AM
Roberto, thanks a lot!
SetCtrlAttribute (..., ..., ATTR_FIRST_VISIBLE_ROW, index) does the trick and also simplifies the code: using active table cell I first had to make the table invisible, set the active cell, and make the table visible again in order to avoid the jumping of the horizontal scroll bar.
08-08-2011 09:00 AM
You're welcome!