Problem with data of uitable
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Andres Beltran
il 7 Lug 2015
Commentato: Andres Beltran
il 7 Lug 2015
Hello I am working in a interface where a button displays a figure which contains a table with some data, I created the table with this code
t = uitable('Position',[20 50 260 100],'Data', d,...
'ColumnName', columnname,...
'ColumnFormat', columnformat,...
'ColumnEditable', [false true true],...
'RowName',[],'CellEditCallBack',@editTable_Callback,'Tag','Tabla1','HandleVisibility','Callback');
But when I try to retrieve the data as
get(handles.Tabla1,'Data')
it shows me an error
Reference to non-existent field 'Tabla1'.
Also if I look at handles it does not appear the handles of the table I created
I appreciate your assistance
0 Commenti
Risposta accettata
Joseph Cheng
il 7 Lug 2015
Modificato: Joseph Cheng
il 7 Lug 2015
since you're coding the uitable instead of using GUIDE you do not have the handles structure. you already have the handles for the uitable assigned to t.
so you just need to go get(t,'data').
the tag works differently when not using GUIDE as it is not also the same name as the GUI item. since you manually assign it to t you should know what item you're referring to. the tag is useful if you need to search for it but right now i cannot get a good instance when you need to. but to find the handles of the uitable if you do not have it you can find it by using the line findall(0,'tag','Tabla1')
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Develop Apps Using App Designer in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!