multiline row with dynamic row height in grid in vaadin 8 - vaadin8

I am using Vaadin 8. In grid, I have multiple columns, where cells corresponding to one column can have multiple lines. I am able to show the multiple lines using following approach
referenceGrid.addColumn(questionAnswerSummary ->
questionAnswerSummary.getAnswersList()
,new HtmlRenderer())
.setCaption(ANSWER_COLUMN + "1");
where getAnswersList have data with <br>
But now the row height does not adjust itself.
How can I adjust the row heights depending on the number of lines in rows or is there any other way to show the multi line in rows.
P.S I was able to achieve the above when I was using vaadin 7. I used verticallayout component as the column type.

Related

Set data range in chart to only use values > 0 in libreoffice calc (without using a filter)

I have created a chart from a spreadsheet which contains a number of values. I want to show values in the chart where one column has values >0 and ignore the others. When I filter on the data the chart is perfect. But I would like the chart to be independent of a filter. I would prefer the chart to "self-filter".
Is this possible?
So in the above example I would like the chart to pick up the first because of the number 7 in the last column, but ignore the next entry because it has a zero in that column.

BIRT Report Designer - Table to Produce Rows in Multi Columns

I have a table, which is listing the name of benefits and it is only 1 column (just name of the benefit).
I'm wondering if there is any native function of BIRT Report Designer to produce rows not only vertically but also populate horizontally to 3-4 columns.
Something like below:
Benefits List
Benefit-1 Benefit-3 Benefit-5
Benefit-2 Benefit-4 Benefit-6
Thanks in advance for any advice.
Ok, I found a solution!
Under the following link there is a Eclipse Community Page Link recommendation about an additional computed column. Even though I don't have any computed column, the recommendation gave me an inspiration. Instead of creating an additional column, I used the rownum that is used generally to bind dataset parameter. For the table row, I created "visibility" condition that checks if the rownum + 1 is divided by 3. Depending on what is the result, it will be hidden or viewed:
Main Grid
It includes a grid with 2 rows and 3 columns. 1 row is merged to view the header. In each column of second row, the same table is placed with the same dataset.
Image Showing Main Structure
Select Table Row
Image Indicating Row Selection
Set the Visibility
Image Showing Details of Visibility Condition
The syntax basically means: "Do not show the row if the division result is not 1".
For the second column, you will need to compare with 2: (row.__rownum + 1) % 3 != 2 and the third column with 0: (row.__rownum + 1) % 3 != 0
Hope it'll be helpful for someone.
An more straightforward approach ist to use a List item instead of a Table item.
In the detail area of the List, create a Grid item of fixed width and height.
Put the content (e.g.) text into the grid's cells.
Important: Set the "display" property of the grid to "inline" instead of the default "block".
This way BIRT will put the grids from left to right until the line is full.
Then it will fill the next line (think of "display: inline" like adding words to a paragraph).

Adding tooltip to rows in treeview in gtkmm

I am using a Gtk::TreeView to create a tree view in gtkmm. It has two columns. The first column has two types of icons in different rows. One icon is used to add an element to the tree and the second is used to delete the element from the tree.
I have accessed the column number of the first column and added tooltip to the icons. However, I need different tooltips for both the icons.
A variable COL_ADD is used to compare the column using:
if (col == _tree.get_column(COL_ADD-1)) {
set_tooltip_text(_("Add selection to set"));
}
where col is Gtk::TreeViewColumn.
Since both the icons belong to same column, so they are getting the same tooltip. How do I differentiate to get the corresponding rows of icons to add different tooltips to them?
I guess that Gtk::TreeView::set_tooltip_cell() is what you need:
https://developer.gnome.org/gtkmm/stable/classGtk_1_1TreeView.html#ae7cc8fde03c481de81fc9d13e34bff98

Using grid-span w/ a grid initialized with the compound grid function

After you utilize the compound function after importing singularitygs/extras, how to use grid-span to then alternate between the two (or more) grids we instantiated with that function--the third parameter of the grid-span mixin, $grid, or another way?
When working with compound grids, say a compound 3/4 column grid, you aren't using either a 3 column grid or a 4 column grid, you are creating a new asymmetric grid based on the properties of the grids you are compounding. Take a look at the following image:
The top section shows the final compound grid, with the middle section showing the grid split into thirds and bottom section showing the grid split into quarters. You span the final compound grid as normal, just keeping in mind how you want to span each compound.

jQGrid With Multiple Row Data

I have a requirement to display a single jqgrid into several lines (2 or 3). The user does not want to use the grid horizontal scroll bar and would like to see several data at once.
Anybody with an idea how to do this?
If I understand your question correctly you want to wrap rows in the grid because the grid have large number or rows. It's not possible because jqGrid are base on HTML <table> and the row (<tr>) of table can't be wrapped.
If you have grid with columns which text is long you can consider wrapping inside of cells of grid. See the answer, this one, this one and the answer too.

Resources