GWT DataGrid Widget unpredictable row height issue...

1,311 views
Skip to first unread message

Bill M

unread,
Feb 27, 2012, 1:55:08 PM2/27/12
to Google Web Toolkit, blin...@aol.com, bcon...@yahoo.com
Hi all,

I'm loading the new DataGrid Widget with the results of a SQL query.
I have noticed that some rows (just a few) are appearing with a larger
row height than others, on a load of about 1000 rows. I tried setting
each column of the row to a fixed value (not using the results of the
query), to see if maybe some potential overflow of field widths was
occuring, maybe causing a "wrap", which would explain the larger row
height. But, I found this was not the case. And for info purposes, I
am using the default font from the FireFox Browser.

Are there issues with getting a consistent row height out of GWT 2.4/
DataGrid widget? Are there workarounds? I saw some others noting
issues of rowHeight from the CellTable widget. Are there issue's with
this widget? Or would an issue like this have to be originating from
my application?

Appreciate any insight!

Thanks,
Bill M.

vinayak kulkarni

unread,
Mar 2, 2012, 5:14:20 AM3/2/12
to Google Web Toolkit
Hello,
I am using the datagrid but didnt face any issue related to larger row
size.
It only occurs during data wrapping if text size is more.

In your case, some data might have been overflown with space character
to the next line which may be showing larger size

Bill M

unread,
Mar 2, 2012, 5:27:08 PM3/2/12
to Google Web Toolkit
Hi Vinayak,

I tried setting using the same data for each row, yet I still got some
rows appearing with larger heights.
And each row was loaded with the same exact data.

I'm try loading with field/column of the row with "" and see what that
does.

Thanks,
Bill M.

On Mar 2, 5:14 am, vinayak kulkarni <bkvina...@gmail.com> wrote:
> Hello,
> I am using thedatagridbut didnt face any issue related to largerrow
> size.
> It only occurs during data wrapping if text size is more.
>
> In your case, some data might have been overflown with space character
> to the next line which may be showing larger size
>
> On Feb 27, 11:55 pm, Bill M <blinte...@aol.com> wrote:
>
>
>
> > Hi all,
>
> > I'm loading the newDataGridWidget with the results of a SQL query.
> > I have noticed that some rows (just a few) are appearing with a larger
> >rowheightthan others, on a load of about 1000 rows.  I tried setting
> > each column of therowto a fixed value (not using the results of the
> > query), to see if maybe some potential overflow of field widths was
> > occuring, maybe causing a "wrap", which would explain the largerrow
> >height.  But, I found this was not the case.  And for info purposes, I
> > am using the default font from the FireFox Browser.
>
> > Are there issues with getting a consistentrowheightout of GWT 2.4/
> >DataGridwidget?  Are there workarounds?  I saw some others noting
> > issues of rowHeight from the CellTable widget.  Are there issue's with
> > this widget?  Or would an issue like this have to be originating from
> > my application?
>
> > Appreciate any insight!
>
> > Thanks,
> > Bill M.- Hide quoted text -
>
> - Show quoted text -

Bill M

unread,
Mar 7, 2012, 2:43:49 PM3/7/12
to Google Web Toolkit
Hi Vinayak,

I think I found the problem. I have a column whose contents I want to
hide from the user. However, I need the data available. So, from
another post I came across, someone said the way to hide a column is
to set it's column width to 0. However, it really seems I'm getting
some "wrapping" occuring with this hidden field, causing the height of
the entire row it's on to grow.

So, is there another way to hide the contents of a column? Or, will I
need to come up with a paralled data structure to hold column's I
don't want displayed in the DataGrid?

Appreciate any assistance.
Thanks,
Bill M.

On Mar 2, 5:27 pm, Bill M <blinte...@aol.com> wrote:
> Hi Vinayak,
>
> I tried setting using the same data for eachrow, yet I still got some
> rows appearing with larger heights.
> And eachrowwas loaded with the same exact data.
>
> I'm try loading with field/column of therowwith "" and see what that
> > - Show quoted text -- Hide quoted text -

Sachin Shekhar R

unread,
Apr 10, 2012, 1:34:49 PM4/10/12
to google-we...@googlegroups.com
Probably you can fix it by adding css property "white-space: nowrap;" .dataGridFooter, .dataGridHeader:hover,.dataGridCell  by using custom grid css file with GWT default grid css.

Andrei

unread,
Apr 11, 2012, 12:43:00 PM4/11/12
to Google Web Toolkit
Assign your table a css class - for example, .cellTable. Then add this
to your css file:

.cellTable tr {
height: 24px !important;
}

(or whatever height you need)

On another note, I am not sure why you need to add data to a table and
then hide it - I can't think of any use case. The data is already in
your data provider, and you can use it.

Andrei
Reply all
Reply to author
Forward
0 new messages