[CLOSED] Microsoft JScript compilation error: Syntax error (eval(result.script));

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] Microsoft JScript compilation error: Syntax error (eval(result.script));

    Hi,

    I am creating dynamic combobox code as below

    #region Sezgin: Filtre alanı combo olan veriler icin kayıtları dolduran methodtur
        private void addComboFilter(HeaderColumn hc,int id,string filterId)
        {
            procGetColumnComboFilterDetailsResult config= DatabaseUtils.retrieveGridColumnComboFilterDetails(id);
    
            ComboBox combo = new ComboBox {ID = "filter" + filterId, DisplayField=config.DISPLAY_FIELD, ValueField=config.VALUE_FIELD,SelectedIndex=config.SELECTED_INDEX};
            Store store = new Store { Reader = { new JsonReader { IDProperty = config.VALUE_FIELD, Fields = { 
                 new RecordField { Name = config.VALUE_FIELD,Type = (RecordFieldType)Enum.Parse(typeof(RecordFieldType), config.VALUE_FIELD_TYPE),Mapping=config.VALUE_FIELD },
                 new RecordField{Name = config.DISPLAY_FIELD,Type = (RecordFieldType)Enum.Parse(typeof(RecordFieldType), config.DISPLAY_FIELD_TYPE),Mapping=config.DISPLAY_FIELD}} } }
            };
            int? count = null;
            DataSet ds= DatabaseUtils.runSP(config.SP_NAME, new List<SqlParameter>(), global::System.Configuration.ConfigurationManager.AppSettings["RASAD_SERVER"], "Rasad",ref count);
            store.DataSource = ds.Tables[0];
            store.DataBind();
    
            combo.Store.Add(store);
            hc.Component.Add(combo);
        }
        #endregion

    result script value =

    Ext.net.ResourceMgr.registerIcon(["Anchor"]);grid.setHeight(300);grid.setWidth(755);storeRasadGrid.addField({name:"HOSTNAME",type:"string"},-1,true);storeRasadGrid.addField({name:"IP_ADDRESS",type:"string"},-1,true);storeRasadGrid.addField({name:"PERSON_IN_CHARGE",type:"string"},-1,true);storeRasadGrid.addField({name:"PURPOSE",type:"string"},-1,true);storeRasadGrid.addField({name:"OS",type:"string"},-1,true);storeRasadGrid.addField({name:"ENVIRONMENT",type:"string"},-1,true);.callbackRefreshHandler(response, {serviceResponse: {success:true,data:{data:[{"ID":1,"ENVIRONMENT":"VMWARE"}], total: 0}}}, , o.eventType, o.action, o.extraParams);storeRasadGrid.addField({name:"DRC",type:"boolean"},-1,true);ucExportWindow_treePanel.setIconClass("icon-anchor");ucExportWindow_treePanel.setAutoScroll(true);ucExportWindow_treePanel.setWidth(250);ucExportWindow_treePanel.expand();ucExportWindow_treePanel.hideParent=false;ucExportWindow_treePanel.setHeight(300);ucExportWindow_treePanel.shadow="Frame";ucExportWindow_treePanel.animate=true;ucExportWindow_treePanel.rootVisible=true;panelGridSecurityEnvanterForm.setWidth(785);grid.setHeight(330);panelGridSecurityEnvanterForm.setHeight(370);storeComboSubnetType.callbackRefreshHandler(response, {serviceResponse: {success:true,data:{data:[{"ID":1,"SUBNET_TYPE":"254"},{"ID":2,"SUBNET_TYPE":"247"},{"ID":3,"SUBNET_TYPE":"DMZ WEB"},{"ID":4,"SUBNET_TYPE":"DMZ 2"}], total: 0}}}, storeComboSubnetType, o.eventType, o.action, o.extraParams);panelGridSecurityEnvanterForm.setHeight(400);
  2. #2
    Hi,

    Please set ID for the combo or bind the store after the following line
    hc.Component.Add(combo);
    Vladimir Shcheglov
    Sr. Developer
  3. #3
    Quote Originally Posted by Vladimir View Post
    Hi,

    Please set ID for the combo or bind the store after the following line
    hc.Component.Add(combo);
    error reason store id doesn't set.
  4. #4
    Hi,

    Sorry, I meant set ID for the store
    Vladimir Shcheglov
    Sr. Developer
  5. #5
    Quote Originally Posted by Vladimir View Post
    Hi,

    Sorry, I meant set ID for the store
    thanks for answer:)

Similar Threads

  1. Replies: 2
    Last Post: May 08, 2012, 4:34 PM
  2. Replies: 17
    Last Post: Oct 12, 2011, 5:54 PM
  3. Microsoft JScript runtime error
    By kiran malgi in forum 1.x Help
    Replies: 4
    Last Post: May 27, 2010, 2:28 AM
  4. Microsoft JScript runtime error: 'Ext' is undefined
    By Satyanarayana murthy in forum Open Discussions
    Replies: 11
    Last Post: Mar 31, 2010, 12:54 PM
  5. Replies: 6
    Last Post: Nov 13, 2009, 11:15 PM

Posting Permissions