Editing newly added columns in existing uitable.
4 views (last 30 days)
Show older comments
I would like to ask this:I have created a uitable(size 1x8) in GUIDE and have added the following code in the opening function:
someData={'EU','US','OT','EE','CA','IA','AF','LA'};
set(handles.uitable2,'Data',someData)
I wanted to be able to add columns to this table with a push button and have written it this way:
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
data = get(handles.uitable2,'Data');
newColumn={''};
newData=[data,newColumn];
set(handles.uitable2,'Data',newData)
My problem is that when i push the button,a new column does appear,but i can't edit or write in it.How can i do that? (I want to be able to write strings,not numbers in it too).
Also I would like to ask how I can create a new uitable whose row names will be the names of the existing uitable i just created,and if this can change dynamically,according to how many columns I have added to my first uitable.
I realize this might be kind of a difficult question,but any answers would be greatly appreciated. Thanks
0 Comments
Accepted Answer
More Answers (1)
See Also
Categories
Find more on Migrate GUIDE Apps in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!