function deleteRow(this)

selectedRow = this.TsTable.Table.getTable.getSelectedRows;

%% Event rows cannot be deleted
rowdeleted = false;
tableData = cell(this.TsTable.Table.Data);


if all(selectedRow>=0)
    % Exclude event rows from selection
    selectedRow = selectedRow(~this.Tstable.EventRow(selectedRow+1));
    
    % Null out removed rows
    tableData(selectedRow+1,:) = [];
    if isempty(tableData)
        errordlg('Cannot delete all the rows','Time Series Tools','modal')
        return
    end
    this.Tstable.EventRow(selectedRow+1) = []; 
    
    % Update table
    this.Tstable.Table.setData(tableData);

    % Force an update of the table to that syncts uses up to date information
    drawnow

    % Update the views and rebuild the table
    this.syncts;  
end


