GWT celltable : editable cell size increases when clicked - gwt

I have a celltable in my GWT application which have editable cells , when i click on any editable cell in my celltable , it bocomes editable + it also increase its size a lot..
Is there any way i can avoid this change of width of the editable cell when clicked ..hed
attached are two images , one before click on the cell and other after click on the cell ..
can see the whole celltable width changes .. I want to avoid this and want to keep the size constant even after i click on the editable cell

Use a 100% fixed-layout table, either using
cellTable.setWidth("100%", true);
or
cellTable.setWidth("100%");
cellTable.setTableLayoutFixed(true);
Fixed-layout and column width is explained here.

Related

Display/Hide cell in table using Birt report

I Have two cell in one row.
I want to show and hide based on condition.
For cell visiblity expression option not showing this is showing only for text/label.
In the script I am adding
if(params["chk"].value == "both"){
this.getStyle().display = "none";}
Any solution please?
You cannot hide a cell. This wouldn't make sense. You can hide the content inside a cell, or you can hide whole rows or columns.

Large text not displaying as multiple lines for UILabel in a custom tableview cell

Setting up the UILabel on the attributes inspector as follow expands the cell and display the large text as multiple lines correctly for a Subtitle tableview cell:
Lines = 0
Line Break = Word wrap
But this doesn't work in a custom tableview cell for some reasons. In the custom cell, I added new labels and setup the attributes the same way but the cell doesn't expand.
It could be a matter of constraint.
Check to see if there are any conflicting constraints or fixed settings.
In order for elements of a cell to be set flexibly, the height of the cell must be set to the automatic value.
When I set it up like this, I was able to get the results I wanted.

Disable Column Cell Selection

I would like to make a column not be able to be selectable. I currently have icons in the column and whenever the cell is clicked it gets the clicked effect. The icons trigger a modal window, so when the window is closed the cell has the clicked effect. Is there a column definition that disables the cell selection of all cells in the specified column?
Add this to your column definition to override the border style that's applied to the cell on focus
cellStyle: {border: 'none !important'}

Auto Resizing NatTable in Eclipse RCP Application

I am trying to auto resize my NatTable. I have few things :
1) My NatTable consists of only one column.
2) I am hiding NatTable occasionally.
3) The Part Control surrounding NatTable auto resizes on mouse drag. NatTable should also fit the size.
4) I have custom cell painters for NatTable Cells.
I tried with my bodyDataLayer(Which is based on GlazedListsDataProvider) :
bodyDataLayer.setDefaultRowHeight(35);
bodyDataLayer.setColumnWidthByPosition(0, 100);
bodyDataLayer.setColumnPercentageSizing(true);
But nattable does not show up at all. If I double click the invisible rows, I get required row. But natTable itself does not appear.
NatTable shows up only if
bodyDataLayer.setDefaultColumnWidth(SOME_VALUE);
Only default column width works.
I tried to add a Paint Listener to NatTable to initialize auto resize commands as suggested on Official Documentation. But it has no effect at all.
I tried to add
natTable.setLayerPainter(
new NatGridLayerPainter(natTable, SOME_VALUE));
with auto resizing of columns by position.But it also renders nothing. I am wondering how to resize my NatTable?
Typically DataLayer#setColumnPercentageSizing(true)should be sufficient for percentage sizing.
I can only assume that hiding NatTable occasionally has a negative effect, because that might lead to miscalculation of the percentage values. 100% of 0 is still 0.
Are you calling NatTable#setVisible(false) to hide the NatTable? In that case try to execute the following lines of code
natTable.doCommand(new ClientAreaResizeCommand(natTable));
natTable.redraw();
If that fixes your issue, please open a ticket and report that issue. In that case it seems we need to add a listener for SWT.Show or override setVisible() to execute these lines of code on visibility changes.

Whole row editable on click of a row in GWT editable grid

I need to implement a functionality like onclick of a row, whole row must become editable.
For eg: Currently I have 4 columns, each column have edittext cell as the datatype (element). Onclick of a row, each edittext cells must be in edit mode (input mode). Can this implementation be done??
Currently when we click on each component it opens in input mode, but i need to have input mode for all cells on click of a row.
Please suggest and give some ideas.
I think you could do the job with some things in the "databinding" part of GWT :
com.google.gwt.editor.client.Editor