Here is the markup, I have been trying to cancel the valueChanging, the TextChanging - just about all of the Change events for a WHDG Editor Provider (TextEditorProvider) , however, when I simply set the client function to the following,
// This is not canceling the event
function Default_Changed(sender, eventArgs) { debugger; eventArgs.set_cancel(true); }
I have my WHDG as follows (in assigning the Editor, and the Behavior setting for the column
(Behaviors in my Child Band)
<Behaviors
>
<ig:EditingCore AutoCRUD="false" Enabled="true" EnableInheritance
="true">
<ig:CellEditing EditModeActions-EnableOnActive="true"
EditModeActions-MouseClick="Single"
EditModeActions-EnableOnKeyPress
<ColumnSettings
<ig:EditingColumnSetting ColumnKey="ChildID" EditorID="TestTextEditor"/>
</ColumnSettings>
<EditModeActions EnableOnActive="True" EnableOnKeyPress="True" MouseClick="Single"
/>
</ig:CellEditing>
<ig:RowAdding Enabled="true" Alignment="Bottom" EnableInheritance="true"
<ColumnSettings >
<ig:RowAddingColumnSetting ColumnKey="Test_DynamicMessage" EditorID="DynamicEditor" />
<ig:RowAddingColumnSetting ColumnKey="ChildID" EditorID="TestTextEditor" />
</ColumnSettings
<EditModeActions EnableOnActive="True" EnableOnKeyPress="True" MouseClick="Single" />
</ig:RowAdding>
</Behaviors>
</ig:EditingCore>
(Text Editor Provider)
<ig:TextEditorProvider ID="TESTTEXT">
<EditorControl ID="TestTextEditor" runat="server" StyleSetName="Default">
<ClientEvents ValueChanging="Default_Changed" />
</EditorControl>
</ig:TextEditorProvider>
(I am beginning to lose faith after a conversion of 300 hours from the UltraWebGrid - you can't Do an UpdateCellBatch - whats up with dat ?)
I am storing my data(as it is updated and added to in Cache, and then update all the changed data during a save, as you can not manually add rows or update rows on the client without having a postback occur. But I digress - anyone else seen or had this problem, or am I just doing this wrong ?
Very Urgent, Thanks!
Hi ContInt,
I am following up to check if you are still experiencing any issues. Please contact me if you have any questions.
Best Regards,
Petar IvanovDeveloper Support EngineerInfragistics, Inc.http://es.infragistics.com/support
I tested your scenario and the ValueChanging event seems to be cancelled alright under 11.1. However cancelling the event does not revert to the old cell value, hence if you want to also revert to the old cell value you can use something similar to:
eventArgs.set_value(eventArgs.get_oldValue());eventArgs.set_cancel(true);
Regarding batch updates of the WHDG, this feature will be added in version 11.2. You can find some more information on that subject in the following discussion:
http://blogs.infragistics.com/forums/t/59190.aspx?PageIndex=2
Please tell me if this helps.