I have the next piece of code:
@(Html.Infragistics().Combo("CountriesCombo") .LoadOnDemandSettings(pLoad => pLoad.Enabled(true).PageSize(25)) .DataBind() .DataSourceUrl(@Url.Action("GetCountries")) .ValueKey("Id") .TextKey("Text") .Width("400px") .HeaderTemplate("<div class='dropDownHeaderFooter'>Available countries</div>") .FooterTemplate("<div class='dropDownHeaderFooter'>Total: {0} / {3}</div>") .FilteringType(ComboFilteringType.Remote) .Render())
If GetCountries fails (something bad happened in the backend for example), how to catch the exception with Ajax/Javascript/jQuery and show an alert in the client side?
Hi Luis,
Thank you for posting our forums.
Currently, the igCombo doesn't include the ability to catch exceptions and handle them; this has been determined to be a new Product Idea. You can suggest new product ideas for future versions (or vote for existing ones) at http://ideas.infragistics.com.
Alternatively, if you wish to obtain error handling, I recommend using the jQuery.ajax(). Please note, with this approach would require the use of jQuery and not the MVC wrappers.
Please let me know if you have any questions regarding this matter.