Dec 28, 2010, 3:47 PM
How do I use the AfterEdit event of a RowEditor on a GridPanel?
Guys, first of all I was not able to find a 100% complete code for this anywhere, I copied some sample code to use on a GridPanel with an AfterEdit DirectEvent and I'm able to read this parameter from the event, is there an incapsulated method of Ext.Net to parse the results of the parameter that was created with getRowsValues in a more object oriented way?
The Value:
The Grid:
The Value:
[{"lst_id":"f4bfb666-332a-4601-a8e5-aa11688c94a6","lst_created":"2010-12-23T14:40:00","lst_name":"Name!","lst_description":"List created @ 12/23/2010 2:40:00 PM","lst_date":"2011-01-01T00:00:00"}]
The Grid:
<Plugins>
<ext:RowEditor ID="RowEditor1" runat="server" SaveText="Update">
<DirectEvents>
<AfterEdit OnEvent="AfterEdit_GridPanel" AutoDataBind="true" IsUpload="true" Success="true">
<ExtraParams>
<ext:Parameter Name="Parameter1"
Value="Ext.encode(#{GridPanel1}.getRowsValues({selectedOnly : true}))" Mode="Raw" />
</ExtraParams>
</AfterEdit>
</DirectEvents>
</ext:RowEditor>
</Plugins>
The Event:public void AfterEdit_GridPanel(object sender, DirectEventArgs e)
{
object Params = e.ExtraParams[0];
//X.Msg.Notify(((Ext.Net.Parameter)Params).Params["lst_id"].ToString(), ((Ext.Net.Parameter)Params).Params["lst_name"].ToString());
//[{"lst_id":"f4bfb666-332a-4601-a8e5-aa11688c94a6","lst_created":"2010-12-23T14:40:00","lst_name":"Name!","lst_description":"List created @ 12/23/2010 2:40:00 PM","lst_date":"2011-01-01T00:00:00"}]
}