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
975
igCombo doesnt work
posted

can anyone please tell me why this doesnt work ? I would expect that when i start typing, the data retrieval method on my controller should be called, but its not

@Html.Infragistics().Combo().ID("comboOrganisation").DataSourceUrl(Url.Action("AutoComplete", "User")).ValueKey("User_Org").TextKey("User_Org").Width("300px").AutoComplete(true).Render()

[ActionName("AutoComplete")]
public async Task<ActionResult> ComboData(string search)
{
GetOrganisationRequest request = new GetOrganisationRequest(search);
JsonResult result = new JsonResult();
result.JsonRequestBehavior = JsonRequestBehavior.AllowGet;

var organisations = await this._organisationService.OrganisationAutoCompleteAsync(request);
result.Data = organisations;

result.JsonRequestBehavior = JsonRequestBehavior.AllowGet;
return result;
}

  • 975
    Offline posted

    Ive checked the javascript emitted by the MVC helper, this is it

    <script type="text/javascript">//<!--<![CDATA[
    $(function () {$('#comboOrganisation').igCombo({ filterExprUrlKey: 'filter', compactData: true, dataSourceUrl: '/User/AutoComplete', valueKey: 'End_User_Org', textKey: 'OrganisationName', width: '300px', autoComplete: true, closeDropDownOnSelect: true, filteringType: 'remote', inputName: 'comboOrganisation', loadOnDemandSettings: { enabled: false }, dataSource: null });});
    //]]>--></script>

    can you tell me why its not working ?  Its just not hitting the action method on

    dataSourceUrl: '/User/AutoComplete'