Perhaps what you want is the "autoFill" feature from the GridView
class (http://www.gwt-ext.com/docs/2.0.4/com/gwtext/client/widgets/
grid/GridView.html#setAutoFill(boolean))...

" setAutoFill(boolean autoFill)
          True to auto expand the columns to fit the grid when the
grid is created.
"

or the "forceFit"...
(http://www.gwt-ext.com/docs/2.0.4/com/gwtext/client/widgets/grid/
GridView.html#setForceFit(boolean))

" public void setForceFit(boolean forceFit)
   True to auto expand/contract the size of the columns to fit the
grid width and prevent horizontal scrolling.
"

I hope it helps you...

Leo

On Oct 29, 3:50 pm, piltrafeta <[EMAIL PROTECTED]> wrote:
> Hello,
> i'm trying to create a simple grid array but i'm having a problem.
> I have a big columns headers on the right and on the left of my
> defined columns headers...
> So if i set the width for my grid i dont see the columns headers, but
> if i don't set the width i'm having a big grid width my data centered
> on the middle.
>
> Here is my code :
>
> RecordDef recordDef = new RecordDef(
> new FieldDef[]{
> new DateFieldDef("created","d/m/Y"),
> new StringFieldDef("description"),
> new StringFieldDef("author")}
>
> );
>
> MemoryProxy proxy = new MemoryProxy(getNotesData());
> ArrayReader reader = new ArrayReader(recordDef);
> Store store = new Store(proxy, reader);
> store.load();
> notesTable.setStore(store);
>
> ColumnConfig[] columns = new ColumnConfig[]{
> new ColumnConfig("Creado", "created", 100, true),
> new ColumnConfig("Descripción", "description", 300, true, null,
> "description"),
> new ColumnConfig("Autor", "author", 200, true)
>
> };
>
> ColumnModel columnModel = new ColumnModel(columns);
> notesTable.setColumnModel(columnModel);
> notesTable.setAutoExpandColumn("description");
> //notesTable.setWidth(600);
> //notesTable.setAutoWidth(true);
> //notesTable.setHeight(250);
>
> panel.add(notesTable);
>
> Thanks in advance!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"GWT-Ext Developer Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/gwt-ext?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to