MATLAB Answers

Add new rows to Table (GUI uitable)

75 views (last 30 days)
BSantos
BSantos on 4 Jul 2013
Hey guys! After some research, I still can't find the solution for my problem. I have a table that it's filled with info from user, when a button is pushed. The idea is that once new information is inserted and the "add" button pushed, a new row is created on the table and the info copied there, without deleting/overwrite previous data.
Does any of you have a suggestion?? Your help is very much appreciated!
Thanks! BS.
  4 Comments
BSantos
BSantos on 4 Jul 2013
Crystal balls would be nice every now and then... ;) Thanks for the support anyway. With Tom's answer I could solve my problem!
Cheers, BS.

Sign in to comment.

Accepted Answer

Tom
Tom on 4 Jul 2013
%hTable: handle to the table
%newRow : the row of data you want to add to the table.
oldData = get(hTable,'Data');
newData = [oldData; newRow];
set(hTable,'Data',newData)
  1 Comment
BSantos
BSantos on 4 Jul 2013
Tom, Thanks a LOT!!! This just solved my problem!!!

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!