I am using the rowEditTemplate. I am using it to add a new record to the grid. I can add the first record ok, but when I add the second record it looks like the fields never get cleared out. I went to set the control back to its init value. When I tried doing something like this on webNumericEditor, it looks like it saved the value = 0 but when I run a validation on it the value is the old value and not 0.
var t = $find('<%= grdExpense.ClientID %>'
).get_behaviors().get_editingCore().get_behaviors().get_rowEditingTemplate();
var binding = t._bindings._getObjectByAdr("colTotalPaid");
This is how that field is setup in the grid and on the template
<
ig:BoundDataField DataFieldName="Total" Key="colTotalPaid" Width="100px" Header-Text="Total Paid" DataType="System.Decimal" DataFormatString="{0:N2}"/>
template ...
ig:RowEditingClientBinding ColumnKey="colTotalPaid" ControlID="editorTxtTotalPaid" GetValueJavaScript="getEditorValue({ClientID})" SetValueJavaScript="setInnerText({ClientID},{value}, true)" />
This works the first time through but not the second. Here is the validation for this control
asp:CustomValidator ClientValidationFunction="CheckTotalPaid" ID="rfvTxtTotalPaid" runat="server" ErrorMessage="Total Paid is Required." text="*" Font-Bold="True" Font-Size="Large" Display="Dynamic" ControlToValidate="editorTxtTotalPaid" InitialValue="0" ValidationGroup="templateValidation"/>
Hi apalcer,
The RowEditingTemplate is designed for editing existing rows, not adding new ones. You may want to consider creating another template for row addition.
Please contact me if you require further assistance.
Best Regards,
Petar IvanovDeveloper Support EngineerInfragistics, Inc.http://ko.infragistics.com/support
I am following up to check whether you need further assistance with this matter. Please do not hesitate to contact me if you have any questions.