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!