Hi all,
In order to reopen the edit template after a row is added, I execute enterEditMode in the AJAXResponse event
It works, except the fields are bound to the values of the precedently added record instead of default values
When I execute enterEditMode outside this context (via a button) it works flawlessly
Can you please investigate or tell me what is the correct method to resolve this issue?
I'm getting pretty used to infragistics controls but these kind of manipulations seem to stay a bit undocumented...
Thanks for your support!
Hi Antoine,
I've created a sample and it works as you are expecting it to work, by handling the AJAX response event. Here is the code:
function WebDataGrid1_Grid_AJAXResponse(sender, eventArgs)
{
///
var ret = sender.get_behaviors().get_editingCore().get_behaviors().get_rowEditingTemplate();
var row = sender.get_rows().get_row(sender.get_rows().get_length() - 1);
ret.enterEditMode(row);
}
This is the RowEditingTemplate behavior:
<ig:RowEditingTemplate CancelButton="buttonCancel" OKButton="buttonOK">
<ClientBindings>
<ig:RowEditingClientBinding ColumnKey="Color" ControlID="control1" GetValueJavaScript="$get({ClientID}).value" SetValueJavaScript="$get({ClientID}).value={value}" />
ClientBindings>
<Template>
<div style="background-color: white; border: 1px solid black;">
<table border="0" class="customEditRowTable">
<tr>
<td>Some color:td>
<td>
<asp:TextBox runat="server" ID="control1">asp:TextBox>
td>
tr>
table>
<asp:Button ID="buttonOK" runat="server" OnClientClick="return" Text="OK" UseSubmitBehavior="False" />
<asp:Button ID="buttonCancel" runat="server" CausesValidation="False" OnClientClick="return" Text="Cancel" UseSubmitBehavior="False" />
div>
Template>
ig:RowEditingTemplate>
Let me know if this helps. Thanks,
Angel
hey,
Just checking if you need any additional help. Thanks,