jQWidgets Forums

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts

  • nitendrasingh
    Participant

    Hi Dimitar,

    its poping warning saying,

    “stop running the script?

    A script on this page is causing your web browser to run slowly.
    if it continues to run,your computer might become unresponsive.”

    I find the iteration is happening twice which is taking time.. so throwing above error.

    Please help me on this…

    Thanks,
    Nitendra


    nitendrasingh
    Participant

    Hello Dimitar,
    Appreciated for the above reply 🙂

    As per my requirement,
    The code I am pasting below,whereas the hide and show is happening but the processing time is throwing script errow,Please look the code below and let me know,

    var listSource =

    [
    { label: ‘Group1’, value: ‘xyz’,collapsed:true, checked: true,
    items:[{label: ‘Action’, value: ‘gwm_RecordType’},
    {label: ‘Full Name’, value: ‘gwm_FullName’},
    {label: ‘Lifecycle Status’, value: ‘gwm_prospecttemperature’},
    {label: ‘DM’, value: ‘gwm_IsDecisionMaker’},
    {label: ‘Opportunity Size’, value: ‘gwm_TotalOpportunitySize’, selected: true}]

    },
    { label: ‘Group2’, value: ”,collapsed:true, checked: true,
    items:[{label: ‘Last Contact Date’, value: ‘gwm_LastContactDate’,id:’gwm_LastContactDate’},
    {label: ‘Location’, value: ‘Location’,selected: true},
    {label: ‘Phone Number’, value: ‘Phone Number’,id:’Phone Number’},
    {label: ‘Email’, value: ‘Email’,id:’Email’},
    {label: ‘Advisor’, value: ‘gwm_filingofficersystemuserid’,id:’gwm_filingofficersystemuserid’}]

    },
    { label: ‘Group3’, value: ”,collapsed:true, checked: true,
    items:[{label: ‘Last Contact Type’, value: ‘gwm_LastContactType’,id:’gwm_RecordType’},
    {label: ‘ECI’, value: ‘gwm_Eci’,selected: true},
    {label: ‘Total Net Worth’, value: ‘gwm_TotalNetWorth’,id:’gwm_TotalNetWorth’},
    {label: ‘Liquid Net Worth’, value: ‘gwm_LiquidNetWorth’,id:’gwm_LiquidNetWorth’},
    {label: ‘Age’, value: ‘gwm_age’,id:’gwm_age’}]
    },
    { label: ‘Group4’, value: ”,collapsed:true, checked: true,
    items:[{label: ‘Birthday’, value: ‘BirthDate’,id:’BirthDate’},
    {label: ‘Market’, value: ‘gwm_market’,selected: true},
    {label: ‘Team’, value: ‘gwm_team’,id:’gwm_team’},
    {label: ‘Date Created’, value: ‘CreatedOn’,id:’CreatedOn’},
    {label: ‘Employer Name’, value: ‘gwm_EmployerName’,id:’gwm_EmployerName’}]
    },
    { label: ‘Group5’, value: ”,collapsed:true, checked: true,
    items:[{label: ‘Occupation’, value: ‘gwm_occupation’,id:’gwm_occupation’},
    {label: ‘Preferred Name’, value: ‘Salutation’,selected: true},
    {label: ‘Native Name’, value: ‘NickName’,id:’NickName’},
    {label: ‘Sub-Type’, value: ‘gwm_IsIndividual’,id:’gwm_IsIndividual’},
    {label: ‘Days Since Last Contact’, value: ‘DaysSinceLastContact’,id:’DaysSinceLastContact’}]
    },
    { label: ‘Group6’, value: ”,collapsed:true, checked: true,
    items:[{label: ‘Next Meeting Date’, value: ‘gwm_NextActivityDate’,id:’gwm_NextActivityDate’},
    {label: ‘Legal Entity Classification’, value: ‘gwm_businessform’,selected: true},
    {label: ‘City’, value: ‘Address1_City’,id:’Address1_City’},
    {label: ‘State’, value: ‘Address1_StateOrProvince’,id:’Address1_StateOrProvince’},
    {label: ‘Country’, value: ‘Address1_Country’,id:’Address1_Country’}]
    }
    ];

    $(‘#jqxtree’).jqxTree({source: listSource, height: ‘400px’,hasThreeStates: true, checkboxes: true, width: ‘330px’});
    $(“#jqxtree”).css(‘visibility’, ‘visible’);

    $(‘#jqxtree’).on(‘checkChange’, function (event)
    {

    var htmlElement = event.args.element;
    var item = $(‘#jqxtree’).jqxTree(‘getItem’, htmlElement);
    $(“#datagrid”).jqxGrid(‘beginupdate’);

    if (event.args.checked)
    {
    $(“#datagrid”).jqxGrid(‘showcolumn’,item.value);

    }
    else
    {
    $(“#datagrid”).jqxGrid(‘hidecolumn’, item.value);

    }
    $(“#datagrid”).jqxGrid(‘endupdate’);

    });

    Note: The above code is hiding and showing but when doing for the group at group level check is taking too much time to process and throwing script error.

    Please look into this…

Viewing 2 posts - 1 through 2 (of 2 total)