Jan 25, 2011, 9:29 AM
[CLOSED] Microsoft JScript compilation error: Syntax error (eval(result.script));
Hi,
I am creating dynamic combobox code as below
result script value =
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);