GridPanel full width

  1. #1

    GridPanel full width


    I am using a grid panel and I'd like to know how to get the rows of the panel to become full width. I've attached a screenshot which illustrates what I want.

    Click image for larger version. 

Name:	Expand full width.gif 
Views:	105 
Size:	10.7 KB 
ID:	1910

    Is there a property that can do this? I've tried the Width property but to no avail. Here is the code taht I'm using:

    <asp:Content ID="Main" ContentPlaceHolderID="MainContent" runat="server">
    			<ext:HttpProxy Url="/InventoryHome/GetUnitsOfMeasure/" />
    			<ext:HttpWriteProxy Url="/InventoryHome/SaveUnitsOfMeasure/" />
    			<ext:JsonReader IDProperty="Id" Root="data">
    					<ext:RecordField Name="Id" />
    					<ext:RecordField Name="Code" />
    					<ext:RecordField Name="Description" />
    					<ext:RecordField Name="IsInteger" />
    					<ext:RecordField Name="Company" />
    					<ext:RecordField Name="RowVersion" />
    		<ext:Viewport ID="Viewport1" runat="server" Layout="fit">
    					<ColumnModel ID="ColumnModel1" runat="server" Width="1000">
    							<ext:Column DataIndex="Code" Header="Code">
    									<ext:TextField ID="code" runat="server" IsRemoteValidation="true">
    										<RemoteValidation Url="/InventoryHome/UnitValidate" ShowBusy="false" />
    							<ext:Column DataIndex="Description" Header="Description">
    									<ext:TextField ID="description" runat="server" />
    							<ext:CheckColumn DataIndex="IsInteger" Header="Is Integer" Editable="true"/>
    						<ext:RowEditor ID="RowEditor1" runat="server" SaveText="Update" />
    						<ext:GridFilters runat="server" ID="GridFilters1" Local="true">
    								<ext:StringFilter DataIndex="Code" />
    								<ext:StringFilter DataIndex="Description" />
    								<ext:BooleanFilter DataIndex="IsInteger" />
    						<ext:PagingToolbar ID="PagingToolbar1" runat="server" PageSize="15" />
    					<LoadMask ShowMask="true" />
    					<SaveMask ShowMask="true" />
    						<ext:RowSelectionModel ID="RowSelectionModel1" SingleSelect="false" runat="server">
    								<RowSelect Handler="#{btnDelete}.enable();" />
    								<RowDeselect Handler="if (!#{GridPanelUnits}.hasSelection()) {#{btnDelete}.disable();}" />
    						<ext:Toolbar ID="Toolbar1" runat="server">
    								<ext:Button ID="add_button" runat="server" Text="Add">
    										<Click Handler="var rowIndex = #{GridPanelUnits}.addRecord(); 
    												#{GridPanelUnits}[rowIndex].data.Company = null;
    												#{GridPanelUnits}[rowIndex].data.IsInteger = false;
    												#{GridPanelUnits}.startEditing(rowIndex, 0);" />
    								<ext:Button ID="btnDelete" runat="server" Text="Delete" Icon="Delete" Disabled="true">
    										<Click Handler="#{GridPanelUnits}.deleteSelected();if (!#{GridPanelUnits}.hasSelection()) {#{btnDelete}.disable();}" />
    								<ext:Button ID="Button3" runat="server" Text="Save" Icon="Disk">
    										<Click Handler="#{GridPanelUnits}.save();" />
    								<ext:Button ID="Button5" runat="server" Text="Reject Changes" Icon="ArrowUndo">
    										<Click Handler="#{dsUnitsOfMeasure}.rejectChanges();if (!#{GridPanelUnits}.hasSelection()) {#{btnDelete}.disable();}" />
  2. #2

    Add GridView to the grid and set ForceFit="true" for the view
    Vladimir Shcheglov
    Sr. Developer
  3. #3
    Hi Vladimir,

    That did the trick. To flesh out this answer, the following was what was required:

                        <ext:GridView ID="GridView" runat="server" ForceFit="true" />
    On another note, where would I find documentation on how to do such trivial things? Otherwise, I'll end up posting a lot of questions on the forums.
  4. #4

    On another note, where would I find documentation on how to do such trivial things? Otherwise, I'll end up posting a lot of questions on the forums.
    Vladimir Shcheglov
    Sr. Developer
  5. #5
    Direct link to the .forceFit config item.
    Geoffrey McGill
    Founder & CEO
  6. #6
    Thanks Geoffrey,

    Hopefully, that will help someone out there.


Similar Threads

  1. [CLOSED] Content Gridpanel does not resize back to a full width
    By deejayns in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Apr 28, 2011, 12:32 PM
  2. Replies: 6
    Last Post: Jun 11, 2010, 12:47 PM
  3. Full width (%age width) ext:Panels ?
    By henricook in forum 1.x Help
    Replies: 2
    Last Post: Jun 04, 2010, 4:15 PM
  4. [CLOSED] ComboBox Item List not displaying full Width
    By bfolger in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Aug 24, 2009, 10:12 PM
  5. Full width ext:TextArea ??
    By t0ny in forum 1.x Help
    Replies: 9
    Last Post: Jul 15, 2008, 7:43 PM

Tags for this Thread

Posting Permissions