The smartgrid component does not automatically detect controller functions. Rather, links for viewing, editing, etc. They simply pass additional arguments to the same function where the smartgrid is defined (for example, in the URL above, dataset/view/dataset/1 - all the arguments to the index function, which, apparently, is where your smartgrid is defined).
You have at least two options. First, you can add conditional logic to the index.html view, for example:
{{if 'view' in request.args:}} [special code for viewing a record] {{else:}} [regular grid view code] {{pass}}
Alternatively, you can specify a different view from the controller function, for example:
def index(): if 'view' in request.args: response.view = 'default/view_record.html' [rest of index code]
source share