Info

此问题已关闭。 请重新打开它进行编辑或回答。

UITABLE, error deleting selected row

1 次查看(过去 30 天)
Kai
Kai 2013-11-29
关闭: MATLAB Answer Bot 2021-8-20
Hello everybody,
I have a problem deleting data from the uitable.
Let's say the table has 3 rows, the autmatically set index for the selected row is 1. When I delete a single row without selecting it everything works fine. When I delete the last row the new data set for the table is empty, this also works fine.
When I select a certain row the index of the selected row is set through the CellSelectionCallback. But when I try to delete rows that were selected there will be a problem with the last row. When I delete the last row I use the following command:
set(table, 'Data', []);
and I get the following error message:
"Reference to non existent element of a cell array".
This error message can not be caught using try-catch. Any suggestions what I can do to avoid this?
Greets, Kai

回答(0 个)

此问题已关闭。

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by