This is pretty ugly, but I think it should work if you're interested in fixing this with jquery in your template.
I use this technique to hide columns based on other things going on with the page, but should work in your situation too. I haven't tested the re-labeling the column heading so the 10th line may need some tweaking... {{extend 'layout.html'}} <script type="text/javascript"> $(document).ready(function() { {{if not request.args or not request.args[0] in ('new', 'edit', 'view'):}} var rows = $('.web2py_htmltable > table > tbody > tr'); rows.each(function(index) { $('td:nth-child(4)', this).hide(); }) $('th:nth-child(4)', this).hide(); $('th:nth-child(4)', this).val('Column Heading'); {{pass}} }); </script> On Friday, April 24, 2020 at 1:38:21 AM UTC-5, Andrew Rogers wrote: > > (I also asked this question here > https://stackoverflow.com/questions/61402508/how-do-i-hide-child-columns-in-web2pys-smartgrid > ) > > I love the way web2py smartgrid creates automatic child links to > referenced tables. But i can't find how to customise them. > > I want to show only some of the child table links (see below). I know i > can eliminate referenced tables by specifying the `linked_tables` option. > And I can make my own links using the option to make new `links`. And I > can use `fields` to hide columns for the main table. > > But how do I hide one or more of the automatically generated child columns > for the tables that *are* included in `linked_tables`? > > And is it possible to change the link text? > > > > [image: child_links.png] > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/aa3d812e-2a1a-4907-b11e-f0c8f3a35179%40googlegroups.com.