PDA

View Full Version : Grid Panel with Event AfterEdit



stephan1985
Jan 13, 2010, 11:25 AM
Hello,

I try to set an AjaxEvent in a GridPanel after edit a cell. The new value disappeared in my GridPanel. Could somebody tell me why? The AjaxEvent goes into the AfterEdit_GridPanel() Function.






Public Sub AfterEdit_GridPanel(ByVal sender As Object, ByVal e As Coolite.Ext.Web.AjaxEventArgs)
...
End Sub







<ext:GridPanel runat="server" ID="GridPanel1" Title="Report" StoreID="Store1">




<ColumnModel ID="ColumnModel1">
<Columns>
<ext:Column DataIndex="roleId" Header="Role ID" Width="60px" Sortable="True"></ext:Column>
<ext:Column DataIndex="value" Header="Value" Width="60px" Sortable="True"></ext:Column>
</Columns>
</ColumnModel>

<AjaxEvents>
<AfterEdit OnEvent="AfterEdit_GridPanel" AutoDataBind="true" IsUpload="true" Success="true">
<ExtraParams>
<ext:Parameter Name="Parameter1"
Value="Ext.encode(#{GridPanel1}.getRowsValues({selectedOn ly : true}))" Mode="Raw" />
</ExtraParams>
</AfterEdit>
</AjaxEvents>





<SaveMask ShowMask="true" />
<LoadMask ShowMask="true" />





</ext:GridPanel>



I hope that someone can help me. Thanks a lot in advance!

Stephan


With best regards,
Stephan

Vladimir
Jan 15, 2010, 8:47 AM
Hi,

I believe that you rebind store during AjaxEvent (for example, in the PageLoad). Try to wrap your dinding code with

if(!Ext.IsAjaxRerquest){...}