Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6837555
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:29:28+00:00 2026-05-26T23:29:28+00:00

Smartgrid component in web2py is very powerful. I wonder if it is possible to

  • 0

Smartgrid component in web2py is very powerful. I wonder if it is possible to add any additional markup into the View/Edit pages of the smartgrid.

Normall, in web2py we need to create a view html file corresponding to a function in the controller. The problem with smartgrid is that the controller functions are automatically defined by the component.

For example, clicking the View button in a smartgrid goes to the following url:

default/index/dataset/view/dataset/1

Now, my question is if I can create a custom view html file for this page that can contain things other than smartgrid?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T23:29:29+00:00Added an answer on May 26, 2026 at 11:29 pm

    The smartgrid component is not automatically defining controller functions. Rather, the links for view, edit, etc. are simply passing additional arguments to the same function where the smartgrid is defined (e.g., in the above URL, dataset/view/dataset/1 are all arguments to the index function, which presumably is where your smartgrid is defined).

    You have at least two options. First, you could add conditional logic to the index.html view, such as:

    {{if 'view' in request.args:}}
    [special code for viewing a record]
    {{else:}}
    [regular grid view code]
    {{pass}}
    

    Alternatively, you could specify a different view from within the controller function, such as:

    def index():
        if 'view' in request.args:
            response.view = 'default/view_record.html'
        [rest of index code]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The web2py grid/smartgrid documentation documentation has a long list of parameters, but a sparse
Is there any git UI for managing just git branches, hidding commits? All currently
I have several installations of WordPress on a VPS. Instead of going into each
How can I pass the event handler TextBlock_MouseDown_Test1 or TextBlock_MouseDown_Test2 to SmartGrid so that
Is it possible, in SmartGit, to perform a visual three way merge for conflict
I checked some source code into GIT with the commit message Build 0051. However,
I'm a jQuery beginner. I'm adding a bunch of new images into a div.
I recently began importing a number of our projects into a Subversion repository at
How to create a REMOTE branch using smartgit?
Do you use many version control software (TortoiseSVN, Bazaar Explorer, smartgit etc)? One software

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.