<ext:Column DataIndex="Fax" Header="Fax">
<Editor>
<ext:TextField ID="TextField10" runat="server" />
</Editor>
</ext:Column>
</Columns>
</ColumnModel>
<SelectionModel>
<ext:RowSelectionModel runat="server"/>
</SelectionModel>
<BottomBar>
<ext:PagingToolBar ID="PagingToolBar1" runat="server" PageSize="10" StoreID="Store1" DisplayInfo="false" />
</BottomBar>
<SaveMask ShowMask="true" />
<LoadMask ShowMask="true" />
</ext:GridPanel>
</ext:FitLayout>
</Body>
<Buttons>
<Reader>
<ext:JsonReader ReaderID="SupplierID">
<Fields>
<ext:RecordField Name="CompanyName" />
<ext:RecordField Name="ContactName" />
<ext:RecordField Name="ContactTitle" />
<ext:RecordField Name="Address" />
<ext:RecordField Name="City" />
<ext:RecordField Name="Region" />
<ext:RecordField Name="PostalCode" />
<ext:RecordField Name="Country" />
<ext:RecordField Name="Phone" />
<ext:RecordField Name="Fax" />
</Fields>
</ext:JsonReader>
</Reader>
<SortInfo Field="CompanyName" Direction="ASC" />
<Listeners>
<LoadException Handler="Ext.Msg.alert('Suppliers - Load failed', e.message || e )" />
<CommitFailed Handler="Ext.Msg.alert('Suppliers - Commit failed', 'Reason: ' + msg)" />
<SaveException Handler="Ext.Msg.alert('Suppliers - Save failed', e.message || e)" />
<CommitDone Handler="Ext.Msg.alert('Suppliers - Commit', 'The data successfully saved');" />
</Listeners>
</ext:Store>
<ext:ViewPort ID="ViewPort1" runat="server" >
<Body>
<ext:BorderLayout runat="server">
<North MarginsSummary="5 5 5 5">
<ext:Panel runat="server" Title="Description" Height="100" BodyStyle="padding: 5px;"
Frame="true" Icon="Information">
<Body>
Example - Ajax update (insert/delete/update) with SqlDataSource.
<br />
For demo purpose when insert action perfoms, the Region must be "AL" otherwise
custom data validation will fail and return error message.
</Body>
</ext:Panel>
</North>
<Center MarginsSummary="0 5 0 5">
<ext:Panel ID="Panel1" runat="server" Height="300" Header="false">
<Body>
<ext:FitLayout ID="FitLayout1" runat="server">
<ext:GridPanel ID="GridPanel1" runat="server" Title="Suppliers" AutoExpandColumn="CompanyName"
StoreID="Store1" Border="false" Icon="Lorry">
<ColumnModel runat="server">
<Columns>
<ext:Column ColumnID="CompanyName" DataIndex="CompanyName" Header="Company Name">
<Editor>
<ext:TextField ID="TextField1" runat="server" />
</Editor>
</ext:Column>
<ext:Column DataIndex="ContactName" Header="Contact Name">
<Editor>
<ext:TextField ID="TextField2" runat="server" />
</Editor>
</ext:Column>
<ext:Column DataIndex="ContactTitle" Header="Contact Title">
<Editor>
<ext:TextField ID="TextField3" runat="server" />
</Editor>
</ext:Column>
<ext:Column DataIndex="Address" Header="Address">
<Editor>
<ext:TextField ID="TextField4" runat="server" />
</Editor>
</ext:Column>
<ext:Column DataIndex="City" Header="City">
<Editor>
<ext:TextField ID="TextField5" runat="server" />
</Editor>
</ext:Column>
<ext:Column DataIndex="Region" Header="Region" Width="200">
<Editor>
<ext:ComboBox ID="cbStates" runat="server" />
</Editor>
</ext:Column>
<ext:Column DataIndex="PostalCode" Header="Postal Code">
<Editor>
<ext:TextField ID="TextField7" runat="server" />
</Editor>
</ext:Column>
<ext:Column DataIndex="Country" Header="Country">
<Editor>
<ext:TextField ID="TextField8" runat="server" />
</Editor>
</ext:Column>
<ext:Column DataIndex="Phone" Header="Phone">
<Editor>
<ext:TextField ID="TextField9" runat="server" />
</Editor>
</ext:Column>
<ext:Column DataIndex="Fax" Header="Fax">
<Editor>
<ext:TextField ID="TextField10" runat="server" />
</Editor>
</ext:Column>
</Columns>
</ColumnModel>
<SelectionModel>
<ext:RowSelectionModel runat="server"/>
</SelectionModel>
<BottomBar>
<ext:PagingToolBar ID="PagingToolBar1" runat="server" PageSize="10" StoreID="Store1" DisplayInfo="false" />
</BottomBar>
<SaveMask ShowMask="true" />
<LoadMask ShowMask="true" />
</ext:GridPanel>
</ext:FitLayout>
</Body>
<Buttons>
原文:http://hi.baidu.com/visual/blog/item/663928384fde9a2cb9998f4c.html