Delete selected rows in uitable gui

Hi,
I have a uitable that get data which and at the end I save to a file (using a button). As some of the uitable data rows are not needed I wonder if there is a way to delete them prior to the save. I am looking for a solution that remind the spreadsheet delete row like done in excel (right click, delete) but i can not find how to do it?
Nevertheless, other ideas are welcome.
Thanks.

回答 (1 件)

Image Analyst
Image Analyst 2014 年 5 月 25 日

1 投票

You have to delete the rows from the array in MATLAB, then send the new array to the data grid control (untested)
% Retrieve current data from grid control.
gridData = get(handles.grid1, 'Data');
% Delete row(s).
gridData (rowsToDelete, :) = [];
% Send new array back into grid
set(handles.grid1, 'Data', gridData);

カテゴリ

ヘルプ センター および File ExchangeDevelop Apps Using App Designer についてさらに検索

タグ

質問済み:

2014 年 5 月 25 日

回答済み:

2014 年 5 月 25 日

Community Treasure Hunt

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

Start Hunting!

Translated by