How do I modify cell values of editable Uitable after closed the figure?

1 回表示 (過去 30 日間)
ahmed obaid
ahmed obaid 2017 年 8 月 26 日
コメント済み: ahmed obaid 2017 年 8 月 28 日
Dear Experiences..
i have a table, as shown in the following figure
  • where the shown figure, first column is not considered in summation values of last column, also some columns are not shown here, any way:
  • last column is involves the summation of columns [2..n], when i used the following code .. i'm able to change the cell values of my table but when i close the figure, values are not saved..
  • So, how can i store the modified cells values and seen new result in SUM column?, and is there any way to added button in the figure that able to store values after press that button and seen the new result in SUM column.
t=uitable('Data',TT{:,:},'ColumnName',TT.Properties.VariableNames,...
'RowName',TT.Properties.RowNames,'Units', 'Normalized', 'Position',[0, 0, 1, 1]);
set(t,'ColumnEditable',logical(1))
get(t,'Data')
thanks...

採用された回答

Jan
Jan 2017 年 8 月 26 日
The question is not clear:
  • When do you want to save what? After the figure is closed, it is closed and the contents is gone. Of course you have to save any content before it is closed, e.g. by using e "Save" button or automatically inside the CloseRequestFcn or DeleteFcn. Simply save the output of get(TableH, 'Data'), with the uitable handle in "TabelH".
  • How can the first column by a sum of the last column?
is there any way to added button in the figure that able to store values after press that
button and seen the new result in SUM column.
  • Yes, of course there is a way: Simply add a button. Either do this manually or using GUIDE, exactly as you have created the table.
  6 件のコメント
Jan
Jan 2017 年 8 月 28 日
What exactly does "when i running through GUI" mean and what do you observe, when you say "retrieve issue regards that figure do not accept modification"?
ahmed obaid
ahmed obaid 2017 年 8 月 28 日
thanks, i got my answer

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by