MATLAB: Cant i click the checkbox created in UItable in Matlab GUIDE

MATLABmatlab gui

I have a Uitable created where in the 6th column you have a checkbox.I am not able to click the tickbox.Why is that? and also how do i delete a row in my Uitable after clicking that check box? I am attaching my code and picture of the table.Any help will be appreciated
function TerrainGUI_v2_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to TerrainGUI_v2 (see VARARGIN)
type_environment ={'Segm', 'Arc' ,'Circuit', 'Intersection' ,'Round', 'Spline'};
type_Location ={'City', 'Country' ,'Highway'};
slope = [{''}];
len_Portions = {};
radius_Portions = [''];
authorised = [{false}] ;
tabledata =[type_environment(1) type_Location(1) len_Portions slope radius_Portions authorised]; % A condition has to be added that if i add a straight line i should disable the radius of portions
%Column_to_affect = 5;
% tabledata (:,Column_to_affect) = cellfun(@num2str, tabledata(:,Column_to_affect), 'uniform', 0);
columnname ={'Environment','Location','Length of Portions or Angle of turn','Slope','Radius of turn','Authorised'};
columnformat = {type_environment,type_Location,'numeric','numeric','numeric','logical'};
columneditable = [true true true true true true];
set(handles.table_Tracks,'ColumnName',columnname,'ColumnWidth','auto','Data',tabledata,'ColumnFormat', columnformat,'ColumnEditable', columneditable,'RowName',[], 'BackgroundColor',[.7 .9 .8],'ForegroundColor',[0 0 0]);
% Choose default command line output for TerrainGUI_v2
handles.output = hObject;
% Update handles structure guidata(hObject, handles); end

Best Answer

sachin - please ensure that your checkbox column is editable. As for deleting a row, are you deleting the row where you check the box? That may be possible. You can add a CellEditCallback to your GUI that does something like
function uitable1_CellEditCallback(hObject, eventdata, handles)
row = eventdata.Indices(1);
col = eventdata.Indices(2);
if col == 1
data = get(hObject,'Data');
data(row,:) = [];
set(hObject,'Data',data);
end
Try the above and see what happens!