Azzera filtri
Azzera filtri

how can i reset of uitable, then again edit ?

1 visualizzazione (ultimi 30 giorni)
i have made a uitable, i will give number, then i use this number to calculation. i use a pushbutton for reset this table, but after reset, i cant't enter the new value.
this code :
function Reset_Geometry_Callback(hObject, eventdata, handles)
set(handles.Geometry_Busbar,'Data',[]);
set(handles.Geometry_Busbar,'ColumnEditable',true);
then i want to enter new value, there is a warning :
Warning: Table data is not editable at this location.
anyone can help me ?

Risposta accettata

Walter Roberson
Walter Roberson il 15 Dic 2017
set(handles.Geometry_Busbar,'Data',[]);
Instead of setting it to [], set it to a cell with as many columns as there are columns in the uitable
set(handles.Geometry_Busbar,'ColumnEditable',true);
Instead of setting it to a single true, set it to a vector of as many true as there are columns in the uitable.
ncols = 7;
set(handles.Geometry_Busbar, 'Data', cell(1, ncols));
set(handles.Geometry_Busbar, 'ColumnEditable', true(1,ncols));

Più risposte (0)

Categorie

Scopri di più su Migrate GUIDE Apps 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!

Translated by