This is a migrated thread and some comments may be shown as answers.

GridDropDownColumn with DataSource of many records (avoiding large downloads)

1 Answer 89 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Seth
Top achievements
Rank 1
Seth asked on 04 Feb 2009, 07:36 AM
I am having an issue with page download size (with a RadGrid) when using a GridDropDownColumn that points to a datasource with more then a few records in it. I'm using all LINQ data sources.

Upon investigation (thank you firebug's net panel) it appears as if when there's a GridDropDownColumn on a grid, that grid will pull down a lot more data on every callback, and the sql query itself also seems to run much slower.

I really like using GridDropDownColumn functionality for relational editing and such and this revelation has me at a bit of a loss. If the tables the GridDropDownColumns are pointing to have to be small because their entirty will always be riding the connection every time the grid is loaded then I will be kinda sad.

My troublesome line of code (for instance) is:

<telerik:GridDropDownColumn DataField="SectionId" SortExpression="SectionId" UniqueName="SectionId" DataSourceID="SectionDataSource" ListTextField="Title" ListValueField="Id" HeaderText="Section" HeaderButtonType="TextButton" />

which points to the datasource:

<asp:LinqDataSource ID="SectionDataSource" ContextTypeName="AppDataContext" TableName="Sections" OrderBy="SortOrder" runat="server" />

When the Sections table only has a few records in it the whole grid loads quick. If I put a lot of dummy records in the Sections table the grid starts bringing down very large downloads initially and for every callback and the grid works much slower.

Any insight is greatly appreciated,

S

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 09 Feb 2009, 09:31 AM
Hi Seth,

To achieve performance optimization, I will suggest you use RadComboBox in Load on Demand mode. Thus the combo box will be bound only when it is necessary to generate items in it.

Please review these links to find more information about the proposed approach:
Load On Demand, Combo in Grid, Caching items.

Greetings,
Georgi Krustev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Seth
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or