I want to use example like this (from ant website) https://codesandbox.io/s/yw2y55?file=/demo.js:134-229,
but I need to remove what is 'Action' header here. Not just remove the word (which is easily done by leaving 'title' property empty), but I want that last column to be visible just where the data is, i.e. in data rows. Up in header, when you scroll it horizontally, I want other (scrolled) headers to be visible in place of the last header.
If I set 'display:none' in the browser inspector for the last column header, I get the desired behaviour pretty much, but how can I code this?
Ant-wise or maybe some custom css way?
Related
I have a basic 2 column table for a form. In the left column are the labels, and in the right column are the inputs. When the user submits the form, if there are errors I want to display them directly to the right of the input in which the error was relating to. Could anyone provide an example of how to position a div next to the table row without shifting the columns across?
You could have the <div> representing the error inside of the <tr>. If there is no error it could just be empty. You can use a js templating framework like Mustache.js to pass arguments into your <div>.
I would encourage the use of Flex Grid. This is a CSS ruleset that will help you layout your form. You can still use two column format, with the only change being the you will probably want to reduce the size of the first column relative to the second column, to leave room for an error message.
Another option would be to use abandon tables and use CSS Grids instead.
Take a look at these links for more information:
http://flexboxgrid.com/
https://css-tricks.com/dont-overthink-flexbox-grids/
https://css-tricks.com/snippets/css/complete-guide-grid/
I'm trying to create a BIRT report. The code and query side of it works just fine, but the display is rather wonky.
There's one column whose text contents are rather long, and instead of showing some text and allowing scrolling of the text (which is the behavior I'd like there), it simply shows up as a very vertically long text block; kinda ruins the report a bit. I've also tried setting the width on the column, but no dice there either. Any ideas?
Also, as an aside, how do I get the table's columns to have grid lines? I can do that on the rows, but I can't seem to figure out how to do that for the columns. If anyone has insight into that issue, it'd be appreciated.
Here's a screenshot of the issue
Here's my BIRT report XML, without headers and footers in order reduce characters
I think there is no way to use a scrollable view element inside your report, because the output by the default html-emitter is completely static (I would like to see a different answer if this should be wrong).
To your second Question about how to add a border to a column. Click into the cell of your table, click on "Border" inside the "Properties Editor" and select the borders you like to use. This should be repreated for all cells where you want to use the borders, because this configuration is not applied for a whole column but just for one cell. If you want a border for the whole column you need to setup the border for every cell in the column.
If you have already a data cell inside your table cell, you can use the outline view to select the table cell instead of the data cell:
I have a QTreeView on my window and I want to set the following behaviour: columns width must be set to resize to contents, which I have done like this:
tabla->header()->setResizeMode(QHeaderView::ResizeToContents);
Now, what I need to do is set rows to only 1 line, so, if a column contains '\n', they should not be displayed (I have a detailed description dialog to see that).
To sum up, I need to set something like "no multiline" on my treeview.
Any help would be appreciated.
I'd rather not extend qtreeview, since I have a lot of thems and wouldn't like to change them all, but if that's what it takes...
QTreeView seems to ignore the newlines in contents when uniformRowHeights is true (seen with Qt-4.8)
This not documented, so normally it shouldn't be relied upon. It would be best to remove the newlines or replace them with spaces when populating the treeview.
Also, I've noticed an exception: if there is only one row in the treeview and it contains a newline, then it gets displayed in two lines, regardless of uniformRowHeights.
Is there a way to create a dynamic CSS for 2 columns? What I mean is, there are 2 columns in my webpage, the left and right column. It is similar to Facebook, where the profile picture is the left column and the right column is where your feeds are located. When a link is selected from the left column, without refreshing the page, the right column will display the page automatically. The left column is where my links are located and it is fixed. The only change factor is my right column. How can I create and apply the CSS?
You don't need a CSS template in order to use columns. All you need to do is set your column widths to percentages instead of pixels. If you're using a three column grid, with one div taking one column and the other spanning two, then the percentage for the first column would be 33.3333333% (don't bother rounding up, the browser will take care of it) and the second div would be 66.6666666%.
Also, in order for your second div to refresh without loading another page, you'll have to use Ajax.
There are css3 columns but they are not supported by IE. What a surprise!
It sounds more like you just need a css layout framework. Search for css frameworks / templates.
I of course recommend simpl.css.
The page is ugly at the moment but will be updated soon.
Is there a way to hide all the DataGrid columns, and not make them included in layout, and still show the header row along with its header text?
I was able to make the DataGrid columns not visible, and not included in layout, but that makes the header text no longer appear.
If no data comes back from the data provider, I want all the columns to disappear and then the header row still be visible along with its text.
Any helps is appreciated. If I cannot figure it out, I guess I will just not show the entire grid at all, but I really want the header row with its text to still be visible.
FYI - In the place of the grid columns, I have a message alert appear, which is why I still want the header row with its text, but I need to not have the columns included in the layout, or visible so I can display the alert message.
Thanks
A DataGrid allows you to set the rowCount, which is the number of visible rows. Note that the header row is considered a row, so if you want to show just the header, set the rowCount to 1. Hope that helps.