Jan 12, 2012, 1:39 AM
Performance problem when using ext:CommandColumn in ext:GridPanel
Hi all,
I'm new here. I got a performance problem when using ext:CommandColumn in my ext:GridPanel. My GridPanel is quite simple that contains 4 data columns and 1 command column. The requirement requires to have a menu for each row in the grid, so I added a menu with 11 menu items. I randomly creates 1000 rows of data and bind to my grid. When loading the page that contains the GridPanel, the performance is very slow!
I tried to remove the CommandColumn from the markup file, the loading is much faster.
I don't know whether there is a control that can be used to replace the commandcolumn or not. But anyone please advise me on how to improve performance for this case? Thanks for any comments, suggestions!
My code:
I'm new here. I got a performance problem when using ext:CommandColumn in my ext:GridPanel. My GridPanel is quite simple that contains 4 data columns and 1 command column. The requirement requires to have a menu for each row in the grid, so I added a menu with 11 menu items. I randomly creates 1000 rows of data and bind to my grid. When loading the page that contains the GridPanel, the performance is very slow!
I tried to remove the CommandColumn from the markup file, the loading is much faster.
I don't know whether there is a control that can be used to replace the commandcolumn or not. But anyone please advise me on how to improve performance for this case? Thanks for any comments, suggestions!
My code:
<ext:GridPanel ID="test" Frame="false" Height="300px" Cls="x-grid-custom"
StripeRows="true" Header="false" runat="server" AutoWidth="true">
<Store>
<ext:Store ID="storeTest" runat="server">
<Reader>
<ext:JsonReader IDProperty="CustomerID">
<Fields>
<ext:RecordField Name="JobTitle" Type="String"/>
<ext:RecordField Name="CompanyName" Type="String"/>
<ext:RecordField Name="Email1Address" Type="String"/>
<ext:RecordField Name="HomeTelephoneNumber" Type="String"/>
</Fields>
</ext:JsonReader>
</Reader>
</ext:Store>
</Store>
<ColumnModel ID="clContactsSyncList" runat="server">
<Columns>
<ext:Column Header="Job Title" DataIndex="JobTitle" Width="100"/>
<ext:Column Header="Company" DataIndex="CompanyName" Width="100" />
<ext:Column Header="Email" DataIndex="Email1Address" Width="100" />
<ext:Column Header="Phone Number" DataIndex="HomeTelephoneNumber" Width="100" />
<ext:CommandColumn Width="80">
<Commands>
<ext:GridCommand Icon="ArrowDown">
<Menu EnableScrolling="false" Shared="true">
<Items>
<ext:MenuCommand Text="Send an Email" CommandName="SendAnEmail" />
<ext:MenuCommand Text="Send a Letter" CommandName="SendALetter" />
<ext:MenuCommand Text="Send a Memo" CommandName="SendAMemo" />
<ext:MenuCommand Text="Send an Itinerary" CommandName="SendAItinerary" />
<ext:MenuCommand Text="Send a Fax" CommandName="SendAFax" />
<ext:MenuCommand Text="Add to a List" CommandName="AddToAList" />
<ext:MenuCommand Text="Add to My Contacts" CommandName="AddToMyContacts" />
<ext:MenuCommand Text="Add to Outlook" CommandName="AddToOutlook" />
<ext:MenuCommand Text="Deactivate Contact" CommandName="DeactiveContact" />
<ext:MenuCommand Text="Add Contact to Company" CommandName="AddContactToCompany" />
<ext:MenuCommand Text="Depart Roles for Contact" CommandName="DepartRoles" />
</Items>
</Menu>
<ToolTip Text="Menu" />
</ext:GridCommand>
</Commands>
</ext:CommandColumn>
</Columns>
</ColumnModel>
<SelectionModel>
<ext:CheckboxSelectionModel ID="checkSelectionContact" runat="server">
</ext:CheckboxSelectionModel>
</SelectionModel>
</ext:GridPanel>
dany4446.
Last edited by geoffrey.mcgill; Jan 12, 2012 at 5:56 AM.
Reason: please use [CODE] tags