I wish to create an if statement that will check if a specific cells of a logical column inside a uitable are true or false. Therefore, how can I check the logical cell status (upon clicking a push button, not shown)?
Script:
% Table
c1 = rand(10,3);
h = uitable('Units','normalized', 'Position',[0 0 1 1], 'Data',c1);
%# add new column of check boxes to table
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])
If you want to get the selected rows in a button-callback, there's no need for the CellSelection/CellEditCallback.
As I suggested in my first comment, simply get the data and find the selected rows: