First my code without the stuffs not concerned :
<ext:Window ID="CommentPopUp" runat="server">
<Content>
<ext:GridPanel ID="gvComment" runat="server">
<Plugins>
<ext:RowEditor runat="server" SaveText="Save" >
<Listeners>
<CancelEdit Handler="DeleteRow()" />
<ValidateEdit Handler="ValidateComment()"/>
</Listeners>
</ext:RowEditor>
</Plugins>
<ColumnModel>
<Columns>
<ext:Column ColumnID="CommentDate" Header="Date" Align="Center" DataIndex="CommentDate" />
<ext:Column ColumnID="CommentCreator" Header="User" DataIndex="CommentCreator" />
<ext:Column ColumnID="Comment" Header="Comment" DataIndex="Comment" Width="282" >
<Editor>
<ext:TextArea ID="CommmentEditor" runat="server" />
</Editor>
</ext:Column>
</Columns>
</ColumnModel>
</ext:GridPanel>
</Content>
</ext:Window>
My problem is that the ValidateComment()
handler on the ValidateEdit
listener is never fire when I click on the save button of my rowEditor, whereas the CancelEdit
handler works perfectly.
I tried also with the Fn
instead of Handler
and with the ValidateEdit
listener directly on the GridPanel but same issues.
Any ideas of what's wrong in this code ?
EDIT
Got it.
When the edit textArea is empty nothing append but when it contains some text ValidateEdit
is fired.
So new question :
What handler can I use for intercept click on the row editor save button even if the edit field is empty ?
Everything works fine with my test case;
code behind;
presentation layer;