Hi,
I am using a redcombobox with loadondemand with a web service.
I am trying to add a property appContext to Radcombobox context as shown below.
When I click on the combo, the call goes to webservice, but I am unable to get the added property appContext in the webservice method. This is happening only when I open a popup and close it and adding the value from the popup to the combo.
Here I can see only the added item but not all the items of the combo.
Adding appContext:
public IEnumerable<ScriptDescriptor> GetScriptDescriptors()
{
var descriptor = new ScriptControlDescriptor("Sales.Purchase.Controls.SalesSelector", Panel.ClientID);
var appContext = new ApplicationContext();
appContext.DecryptedRequestContext[AppContext.SystemIdRequestKey] = salesId;
appContext.DecryptedRequestContext["id"] = SelectedSaleTypeId;
appContext.DecryptedRequestContext["sv"] = sales.Text;
appContext.DecryptedRequestContext["prid"] = SaleReqID.ToString();
descriptor.AddProperty("btnDummy", Page.ClientScript.GetPostBackEventReference(btnDummy, String.Empty, true));
descriptor.AddProperty("appContext", appContext.EncryptedRequestContext);
descriptor.AddComponentProperty("SalesList", cboSales.ClientID);
return new ScriptDescriptor[] { descriptor };
}
WebService Method:
I am unable to find the key "appContext"
public RadComboBoxData GetSalesData(RadComboBoxContext context)
{
const int itemsPerRequest = 20;
var comboData = new RadComboBoxData();
var encryptedContext = context.ContainsKey("appContext") ? (string)context["appContext"] : null;
.......
return comboData;
}
Please help me out
I am using a redcombobox with loadondemand with a web service.
I am trying to add a property appContext to Radcombobox context as shown below.
When I click on the combo, the call goes to webservice, but I am unable to get the added property appContext in the webservice method. This is happening only when I open a popup and close it and adding the value from the popup to the combo.
Here I can see only the added item but not all the items of the combo.
Adding appContext:
public IEnumerable<ScriptDescriptor> GetScriptDescriptors()
{
var descriptor = new ScriptControlDescriptor("Sales.Purchase.Controls.SalesSelector", Panel.ClientID);
var appContext = new ApplicationContext();
appContext.DecryptedRequestContext[AppContext.SystemIdRequestKey] = salesId;
appContext.DecryptedRequestContext["id"] = SelectedSaleTypeId;
appContext.DecryptedRequestContext["sv"] = sales.Text;
appContext.DecryptedRequestContext["prid"] = SaleReqID.ToString();
descriptor.AddProperty("btnDummy", Page.ClientScript.GetPostBackEventReference(btnDummy, String.Empty, true));
descriptor.AddProperty("appContext", appContext.EncryptedRequestContext);
descriptor.AddComponentProperty("SalesList", cboSales.ClientID);
return new ScriptDescriptor[] { descriptor };
}
WebService Method:
I am unable to find the key "appContext"
public RadComboBoxData GetSalesData(RadComboBoxContext context)
{
const int itemsPerRequest = 20;
var comboData = new RadComboBoxData();
var encryptedContext = context.ContainsKey("appContext") ? (string)context["appContext"] : null;
.......
return comboData;
}
Please help me out