Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2165
handling igcombo datasource error
posted

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?