Re: DataGrid auto-set column width

2011-10-24 Thread jaga
Hi, Had a quick look at this:1) they set dataGrid.setWidth(100%) - but this just scales it to the width of the screen. 2) they do set fixed column widths - have a look at initTableColumns() They are some useful calls available. Have a look at the

Re: DataGrid auto-set column width

2011-10-24 Thread misko237
OK it is 100% width, but on the link I sent to you, they have columns with different width, and that width is not set. Am I wrong? When I make DataGrid, I got equal column width. My table with divide on equal parts. eg. table width = 100px, and I have 5 columns - every column will have 20px width

Re: DataGrid auto-set column width

2011-10-23 Thread misko237
Yeah, it might be a solution (not so nice and clean, but solution)... But, look at this http://gwt.google.com/samples/Showcase/Showcase.html#!CwDataGrid They've made GridTable without setting column width (there is no width attribute on any element). On Oct 22, 5:18 pm, jaga

Re: DataGrid auto-set column width

2011-10-22 Thread jaga
Okay - for the first solution I did as follows: 1) for each row of data 1.1) for each field 1.1.1) count the number of characters 1.1.2) keep a running maximum 2) finally you have an array of maximum sizes where each index corresponds to a column, e.g. ListInteger maxes; 3) for each cell column

Re: DataGrid auto-set column width

2011-10-14 Thread misko237
I have tried the first solution, and I couldn't manage to read real cell width at runtime. The second one is not suitable for me. On Oct 13, 2:57 pm, jaga j.annes...@gmail.com wrote: I have the same problem. For me there are two solutions: 1) calculate the maximum field width at runtime by

Re: DataGrid auto-set column width

2011-10-14 Thread misko237
I have tried with first solution, but I couldn't manage to read real cell element width. Did you succeed? Second solution is not an option for me. On Oct 13, 2:57 pm, jaga j.annes...@gmail.com wrote: I have the same problem. For me there are two solutions: 1) calculate the maximum field width

Re: DataGrid auto-set column width

2011-10-13 Thread jaga
I have the same problem. For me there are two solutions: 1) calculate the maximum field width at runtime by inspecting the row data. Then set the field header size. 2) leave as stock and listen for a mouse click or similar on each field header and then resize it. On Oct 10, 2:49 pm, misko237

DataGrid auto-set column width

2011-10-10 Thread misko237
I have a problem with DataGrid in gwt 2.4. I made table with CellTable, and everything worked fine. But I needed fixed header, and then just replaced CellTable with DataGrid. I had problem with .css file, but than has been resolved. Now, the problem is that every column have fixed width. I need