Apr 27, 2013, 1:33 PM
Emergency help, about the GridPanel call Store. sync (); Unable to pass parameters
Each friend good:
https://examples2.ext.net/#/GridPane...s/StoreEvents/
My program similar to the example above.I added a SyncParameters in Store.But in (OnBeforeRecordInserted, OnBeforeRecordUpdated OnBeforeRecordDeleted) events (BeforeRecordUpdatedEventArgs e) cannot take this all get value.I want to (OnBeforeRecordInserted, OnBeforeRecordUpdated OnBeforeRecordDeleted) in the event Get parameter value ;Please help me to a friend.
Code:
.aspx
https://examples2.ext.net/#/GridPane...s/StoreEvents/
My program similar to the example above.I added a SyncParameters in Store.But in (OnBeforeRecordInserted, OnBeforeRecordUpdated OnBeforeRecordDeleted) events (BeforeRecordUpdatedEventArgs e) cannot take this all get value.I want to (OnBeforeRecordInserted, OnBeforeRecordUpdated OnBeforeRecordDeleted) in the event Get parameter value ;Please help me to a friend.
Code:
.aspx
<ext:Store ID="Store1" runat="server"
AutomaticResponseValues="false"
OnBeforeStoreChanged="Store1_BeforeChanged"
OnAfterStoreChanged="Store1_AfterChanged"
OnBeforeRecordInserted="Store1_BeforeInserted"
OnBeforeRecordUpdated="Store1_BeforeUpdated"
OnBeforeRecordDeleted="Store1_BeforeDeleted">
<Model>
<ext:Model runat="server" IDProperty="SupplierID">
<Fields>
<ext:ModelField Name="SupplierID" />
<ext:ModelField Name="CompanyName" />
<ext:ModelField Name="ContactName" />
<ext:ModelField Name="ContactTitle" />
<ext:ModelField Name="Address" />
<ext:ModelField Name="City" />
<ext:ModelField Name="Region" />
<ext:ModelField Name="PostalCode" />
<ext:ModelField Name="Country" />
<ext:ModelField Name="Phone" />
<ext:ModelField Name="Fax" />
</Fields>
</ext:Model>
</Model>
<Sorters>
<ext:DataSorter Property="CompanyName" Direction="ASC" />
</Sorters>
<SyncParameters>
<ext:StoreParameter Name="RoleId" Value="#{hdRoleId}.getValue()" Mode="Raw" />
</SyncParameters>
<Parameters>
<ext:StoreParameter Name="RoleId" Value="#{hdRoleId}.getValue()" Mode="Raw" />
</Parameters>
<Listeners>
<Write Handler="Ext.Msg.alert('Success', 'The suppliers have been saved');" />
</Listeners>
</ext:Store>
</Store>
.csprotected void Store1_BeforeInserted(object sender, BeforeRecordInsertedEventArgs e)
{
Supplier supplier = e.Object<Supplier>();
db.Suppliers.InsertOnSubmit(supplier);
this.responseRecords.Add(supplier);
}