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?

Parents
No Data
Reply
  • 9190
    Verified Answer
    Offline posted

    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.

Children
No Data