Django-tables2 RowSpan - django

I tried to make a table with rowspan when the cells in the same column have the same value.
Like in this image
And i want to make it with django-tables2
I tried this code line but it shift the X1 to the field2 column at the second record.
Thanks in advance.

There is no support for rowspan in django-tables2. While adding such a feature is a theoretical possibility, I suspect it is non-trivial and will bring quite some complexity.
You are welcome to propose a patch by opening a pull request though, but I will only consider merging it after I can inspect the actual implementation (and documentation, tests).

Related

How to hide one cell in the ASCIIDOC table?

I have a table with human parameters. I want to hide one column, for example age, if attribute :showall: is not set. How to do that? I can hide only the whole table, but not the one column.
.Human parameters
:showall:
ifdef::showall[]
[cols="1,1,1,1,1"]
|===
|Name
|Sex
|Age
|Country
|Weight
5+^|Values
|John Daw
|Male
|41
|Algeria
|85
endif::showall[]
That's not a built in feature.
You have two options:
For cell content that should be hidden, simply remove it from the table.
If you need show/hide functionality, you'll need to add some custom JavaScript and CSS to make that happen.
For option 2, the technique for including JS/CSS is called Docinfo files.
You'll have to experiment with column show/hide, as there may be browser compatibility or presentation issues that would need to be addressed. That said, this answer might show a technique that would work for you: https://stackoverflow.com/a/34098320/4023764

Superset partion graph type order by

We are creating several charts in superset and with the partition type chart the ORDER BY seems to be hard coded and we cannot change it. The goal is too have the months on the left in the correct order (the column in this case is Month). When run in sql lab it works in correct order but in the chart view we cannot change the ordering
Any suggestions?
I assume you mean the dates on the right here?
I work with superset and I have experienced this limitation that does appear to be hard-coded into the ordering once a chart is made. I would suggest if it wasn't too much hassle to add another column to your database of the text value and follow the patter of;
WHERE "Month" = 'January' SET "OrderingColumn" = 'A'
WHERE "Month" = 'February' SET "OrderingColumn" = 'B'
etc etc
Then in your charts you can try: ORDER BY "OrderingColumn"
It is a bit of an inconvenience but if you are able to manipulate your data by changing tables or views this seems to be a solution you could use.
I hope this may be useful even to change the way of approaching the problem.

Qt, creating very custom table

Hello! I wonder if there is a way of making such kind of table with combined cells using Qt.
Any advices?
You can use QGridLayout, add QFrames and set the rowSpan and columnSpan of each item to group cells.
You will have to come up with your own controller, though, for applying data to the cells.
As RobbieE said in comments QTableView::setSpan() function does this job very well!

Looking for a spreadsheet (or table) view for django

Pardon the dumb question, but where can I find a view for Django to display "tables" in a spreadsheet-like format (i.e. one record per row, one field per column).
(The fact that I have not been able to find one after some searching tells me that maybe my noob-level understanding of Django views is way off-base.)
Here I'm intending the term "table" fairly generically; basically, think of a table as an "list of lists", with the additional constraint that all the internal lists have the same length.
(It would be great if this table had spreadsheet features, such as the possibility of sorting the rows by clicking on the column headers, or of cutting and pasting arbitrary rectangular subsets of the cells, but I realize that this may be hoping for too much.)
An other way to do it is to use tabular inlines but a list view is what you are looking for.

Table cell stretching

I have two columns in my table with equal width (50%, 50%).
I am showing search results URL in them. For big urls the columns are stretching and destroying the layout.
Any suggestion to the problem?
SEE How to wrap long lines without spaces in HTML?
These may help too:
Best word wrap algorithm?
Word-wrap in an HTML table
You can set text-overflow:ellipsis; described here and/or use jQuery ellipsis plugin.