I need help with uitable in gui
Mostra commenti meno recenti
Hi I need to know how to transfer data between two uitables in MATLAB like this: Select cell from table1 one then click push button then generate new row in table 2 consists data of the selected row in table 1 Also I need to know how I can delete data of selected row in uitable using push button
Risposta accettata
Più risposte (1)
Image Analyst
il 28 Apr 2016
Try something like this (untested)
% Read both tables
data1 = handles.uitable1.Data;
data2 = handles.uitable2.Data;
% Transfer over data from 1 to 2
data2(row1:row2, col1:col2) = data1(row1:row2, col1:col2);
% Send updated variable back to table 2
handles.uitable2.Data = data2;
3 Commenti
Hamza
il 30 Apr 2016
Image Analyst
il 30 Apr 2016
I don't know if there is a property to say what the user has highlighted in the table, if anything. You can check for properties like handles.uitable2.Selection or handles.uitable2.Value or things like that. You can list all properties and methods like this:
properties(handles.uitable1)
methods(handles.uitable1)
Hamza
il 4 Mag 2016
Categorie
Scopri di più su App Building in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!