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
2350
igCombo - DataSourceUrl doesn't work for Quadruple Cascading Combo
posted

Hi,

I have four igCombo controls on a page and three of them using the Cascade feature.  The problem is that the last Combo box does not call the DataSourceUrl.  The other three combo's call the DataSourceUrl without any issues.

Here is my code:

JQUERY:

    $(function () {
        $('#CopyCompanyId').igCombo({
            selectedItems: [{ index: -1 }],
            textKey: 'Value', valueKey: 'Key',
            dataSourceUrl: '/Home/GetDistict_Generic?a_TableProperty=Companies&a_Property=CompanyCode',
            inputName: 'CopyCompanyId'
        });
        $('#CopySeparateAccountId').igCombo({
            textKey: 'Value', valueKey: 'Key',
            dataSourceUrl: '/Home/GetDistict_Generic?a_TableProperty=SeparateAccounts&a_Property=SeparateAccountCode&a_CascadeParentTable=Companies&a_CascadePath=CompanyId',
            parentCombo: 'CopyCompanyId', parentComboKey: 'CascadeKey',
            inputName: 'CopySeparateAccountId'
        });
        $('#CopyProductId').igCombo({
            textKey: 'Value', valueKey: 'Key',
            dataSourceUrl: '/Home/GetDistict_Generic?a_TableProperty=Products&a_Property=ProductCode&a_CascadeParentTable=SeparateAccounts&a_CascadePath=SeparateAccountId',
            parentCombo: 'CopySeparateAccountId', parentComboKey: 'CascadeKey',
            inputName: 'CopyProductId'
        });
        $('#CopySubAccountId').igCombo({
            textKey: 'Value', valueKey: 'Key',
            dataSourceUrl: '/Home/GetDistict_Generic?a_TableProperty=SubAccounts&a_Property=SubAccountCode&a_CascadeParentTable=Products&a_CascadePath=ProductId',
            parentCombo: 'CopyProductId', parentComboKey: 'CascadeKey',
            inputName: 'CopySubAccountId'
        });
    });
HTML:
<div id ="CopyCompanyId"></div>
<div id ="CopySeparateAccountId"></div>
<div id ="CopyProductId"></div>
<div id ="CopySubAccountId"></div>
.NET:
    public class ComboDataViewModel
    {
        public int Key { get; set; }
        public string Value { get; set; }
        public int CascadeKey { get; set; }
        public ComboDataViewModel(int a_Key, string a_Value)
        {
            Key = a_Key;
            Value = a_Value;
        }
    }
        [ComboDataSourceAction()]
        public ActionResult GetDistict_Generic(string a_TableProperty, string a_Property, string a_ExtendedProperties, string path, string a_CascadeParentTable, string a_CascadeParentField, string a_CascadePath, int? a_CascadeParentId)
        {
            IList<ComboDataViewModel> results = new List<ComboDataViewModel>();
            return View(results.AsQueryable());
        }
GetDistict_Generic only gets called three times for a_TableProperty Companies, SeparateAccounts, and Products.  It does not get called for SubAccounts.
Thanks,
Paul
Parents Reply Children
No Data