PDA

View Full Version : [CLOSED] How to add new Parameter In v2.3



jesperhp
Dec 03, 2013, 7:31 AM
There is a store where I have added new Parameter in V1.1 but now in V2.3 I could not add new Parameter when I try to add new Parameter in store I got the Error/Exception "This operation requires IIS integrated pipeline mode.

"
for Detail I have also attach the detail image

Code That add new parameter in store

this.store_Units.Parameters.Add(new Ext.Net.Parameter("ICategory", value.ToString(), ParameterMode.Raw));


<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<script runat="server">
protected override void OnInit(EventArgs e)
{
this.store_Units.ID = this.ID + "_store";
base.OnInit(e);
}


public string ICategory
{
get
{
if (this.store_Units.Parameters["ICategory"] != null)
{
return this.store_Units.Parameters.GetParameter("ICategory").Value.ToString();
}
else
{
return "";
}
}
set
{
this.store_Units.Parameters.Add(new Ext.Net.Parameter("ICategory", value.ToString(), ParameterMode.Raw));
}
}


public int UserId
{
get
{
if (this.store_Units.Parameters["UserId"] != null)
{
return int.Parse(this.store_Units.Parameters.GetParameter ("UserId").Value);
}
else
{
return -1;
}
}
set
{
this.store_Units.Parameters.Add(new Ext.Net.Parameter("UserId", value.ToString()));
}
}


public string Url
{
get
{
return (this.store_Units.Proxy.Primary as AjaxProxy).Url;
}
set
{
(this.store_Units.Proxy.Primary as AjaxProxy).Url = value;
}
}
public string StoreId
{
get
{
return this.store_Units.ID;
}
}
</script>
<ext:Store ID="store_Units" runat="server" IDMode="Static" RemoteSort="true" AutoLoad="false"
PageSize="24">
<Proxy>
<ext:AjaxProxy Json="true">
<Reader>
<ext:JsonReader Root="rows" IDProperty="ID" />
</Reader>
</ext:AjaxProxy>
</Proxy>
<Model>
<ext:Model ID="Model_Units" runat="server">
<Fields>
<ext:ModelField Name="ID" Type="Int" SortDir="ASC" />
<ext:ModelField Name="Name" Type="String" />
<ext:ModelField Name="Model" Type="String" />
<ext:ModelField Name="SerialNo" Type="String" />
<ext:ModelField Name="WarantyExpireDateTime" Type="Date" DateFormat="M$" />
<ext:ModelField Name="UnitExpireDate" Type="Date" DateFormat="M$" />
<ext:ModelField Name="Quantity" Type="Int" />
<ext:ModelField Name="Manufacturer" Type="String" />
<ext:ModelField Name="UnitsStatusID" Type="String" />
<ext:ModelField Name="BarCode" Type="String" />
<ext:ModelField Name="DepartmentID" Type="String" />
<ext:ModelField Name="LocationID" Type="String" />
<ext:ModelField Name="ServiceAgreemnetID" Type="String" />
<ext:ModelField Name="UserID" Type="Int" DefaultValue="-1" />
<ext:ModelField Name="UnitCategoryName" Type="String" />
<ext:ModelField Name="UnitCategoriesID" Type="Int" />
<%--<ext:ModelField Name="VenderId" Type="Int" />--%>
<ext:ModelField Name="Description" Type="String" />
<ext:ModelField Name="LockUnit" Type="Boolean" />
<ext:ModelField Name="VenderName" Type="String" />
<ext:ModelField Name="PurchaseDate" Type="Date" DateFormat="M$" />
<ext:ModelField Name="CreatedBy" Type="String" />
<ext:ModelField Name="CreatedDate" Type="Date" DateFormat="M$" />
<ext:ModelField Name="DepartmentName" Type="String" />
<ext:ModelField Name="StatusName" Type="String" />
<ext:ModelField Name="LocationName" Type="String" />
<ext:ModelField Name="DeletedBy" Type="String" />
<ext:ModelField Name="DeletedDateTime" Type="Date" DateFormat="M$" />
<%-- <ext:ModelField Name="Update" Type="Boolean" />
<ext:ModelField Name="Delete" Type="Boolean" />
<ext:ModelField Name="Create" Type="Boolean" />--%>
</Fields>
</ext:Model>
</Model>
<Parameters>
<ext:StoreParameter Name="limit" Value="24" Mode="Raw" />
<ext:StoreParameter Name="start" Value="0" Mode="Raw" />
<ext:StoreParameter Name="dir" Value="ASC" />
<ext:StoreParameter Name="sort" Value="ID" />
<ext:StoreParameter Name="gridfilters" />
</Parameters>
</ext:Store>





7320

Daniil
Dec 03, 2013, 3:20 PM
Hi @jesperhp,

Please try to use StoreParameter instead of Parameter.

this.store_Units.Parameters.Add(new Ext.Net.StoreParameter("ICategory", value.ToString(), ParameterMode.Raw));

jesperhp
Dec 04, 2013, 10:34 AM
Hi @jesperhp,

Please try to use StoreParameter instead of Parameter.

this.store_Units.Parameters.Add(new Ext.Net.StoreParameter("ICategory", value.ToString(), ParameterMode.Raw));



Thanks So much its working :)
Mark as close