how can i reset of uitable, then again edit ?
2 次查看(过去 30 天)
显示 更早的评论
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 ?
0 个评论
采纳的回答
Walter Roberson
2017-12-15
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));
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Migrate GUIDE Apps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!