필터 지우기
필터 지우기

uitable problem, add/remove row

조회 수: 1 (최근 30일)
James Hendren
James Hendren 2013년 8월 15일
I am having a problem with my uitable. Theres and add/remove row button. When I press it, the new row's logical check box is not usable. Also, I want to be able to manually input data in each cell, how do I do that?
set(handles.uitable10,'Data',{true;false;false;false;false},...
'ColumnFormat',{'logical','numeric','numeric'},...
'ColumnEditable',true)...
oldDat = get(handles.uitable10,'Data');
nRows = size(oldDat,1);
dat = cell(nRows+1,1);
dat(1:nRows,:) = oldDat;
set(handles.uitable10,'Data',dat{true,true,true},...
'ColumnFormat',{'logical','numeric','numeric'},...
'ColumnEditable',true)...
oldDat = get(handles.uitable10,'Data');
nRows = size(oldDat,1);
dat = oldDat(1:nRows-1,:);
set(handles.uitable10,'Data',dat)
guidata(hObject,handles)

답변 (1개)

Walter Roberson
Walter Roberson 2013년 8월 15일
dat{true,true,true} is not going to yield a cell array.
  댓글 수: 3
Jan
Jan 2013년 8월 17일
@James: When answers of Walter are not very useful, this is usually related to missing accuracy of the question. At least I do not understand, what you are looking for. Please explain the relation between the text and the posted code.
Walter Roberson
Walter Roberson 2013년 8월 18일
The code for the callbacks for the add and remove buttons are going to be needed.
To manually input data into the uitable, just go ahead and type new values in once the table has been created.
What will you do with the data once it is in the table ?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by