I am using a UITABLE to display some data. After displaying the table i want to add a logical column to the end of the table. And depending on columns checked or unchecked future actions are taken. Any idea Guys?
Asked
Active
Viewed 4,713 times
1 Answers
2
An example:
%# initial table
c1 = rand(10,3);
h = uitable('Units','normalized', 'Position',[0 0 1 1], 'Data',c1);
%# add new column of check boxes
c2 = c1(:,1)>0.5;
set(h, 'Data',[num2cell(c1) num2cell(c2)], ...
'ColumnFormat',[repmat({[]},1,size(c1,2)),'logical'], ...
'ColumnEditable',[false(1,size(c1,2)),true])
You might want to handle the CellEditCallback
to perform custom actions.

Amro
- 123,847
- 25
- 243
- 454