I have a simple form with several dropdowns and a Submit button. I set EnableAutomaticLoadOnDemand="true" on the dropdowns and set the data source in the codebehind like this:
But I do not call DataBind().
GetItems() is a simple LINQ query that returns an IQueryable. This is an example:
When I load the page, submit the form, or click on one of the dropsdowns, every single dropdown does a round trip SELECT from the data source before submitting. Why is this?
RadComboBox1.DataSource = Context.GetItems()
But I do not call DataBind().
GetItems() is a simple LINQ query that returns an IQueryable. This is an example:
sch = from h
in
Context.LktSchoolYearOutcomesENT
where !h.Deleted
orderby h.LkSchoolYearOutcomeENT.SchoolYearOutcome ascending
select
new
NameValuePair
{
Name = h.LkSchoolYearOutcomeENT.SchoolYearOutcome,
Value = h.LkSchoolYearOutcomeENT.OutcomeId
};
When I load the page, submit the form, or click on one of the dropsdowns, every single dropdown does a round trip SELECT from the data source before submitting. Why is this?