Hello,
I'm trying to wrap my head around the performance considerations for using large data sets with the igcombo. To provide a little context, here's my relevant View code:
@(Html.Infragistics().ComboFor(model => Model.BrandName) .DataSourceUrl(Url.Action("BrandAutocomplete")) .Width("24%") .HtmlAttributes(new System.Collections.Generic.Dictionary<string, object>() { { "class", "col-md-6 item-search-input" } }) .ValueKey("BrandId") .TextKey("BrandName") .ShowDropDownButton(false) .FilteringType(ComboFilteringType.Remote) .FilterExprUrlKey("filter") .FilteringCondition("contains") .RenderMatchItemsCondition(ComboRenderMatchItemsCondition.Contains) .DataBind() .Render() )
The problem is that approximately 35,000 results will be returned from the BrandAutocomplete action. This makes the combo box completely unusable since each letter typed results in a "contains" search of 35,000 records.
Of course, the problem is not really with the igcombo itself, but with my particular business case. However, I was wondering if anyone else has needed to use igcombo with a large data set, and if so, are there any ways that I can work with igcombo to make the control feel more usable? Am I trying to force a control to do something that it isn't really designed to do? Are there perhaps ways that I can structure my controller action to query the database more efficiently (my ORM is Entity Framework 6)?
Thanks in advance for any advice you have!
Hello Kyle,
Thank you for posting in our forum! I could suggest you to test this scenario by enabling the LoadOnDemand() feature. The code snippet below shows its implementation:
@(Html.Infragistics().Combo().ID("combo1")
…
.LoadOnDemandSettings(load => load.Enabled(true).PageSize(20))
.Render()
)
Please let me know if this improves the performance enough.
Thanks Dimka. Initially, because there are so many possible results, I wanted to turn off the drop-down feature altogether and use the igcombo only as an auto-suggest box (much like the first example on this page: http://www.igniteui.com/combo/editing).
Do you know if LoadOnDemand can be used if the drop-down is turned off? If not, I think I will allow the drop-down and try the LoadOnDemand feature to see how it feels. Unfortunately, I may not have a chance to work on this feature for a little while, so it may take me some time to experiment with this in my app. In the meantime, I'll go ahead and mark your answer as correct.
Thanks!