Sep 21, 2011, 7:57 AM
Button Click Fire event parameters
Hi,
I'm trying to simulate a button click server side.
I have the code of the editable grid panel sample on Ext.Net web site plus I have added a button to insert a new row:
Now I would simulate the insert button click by server side code.
I've tried with the following:
Do you have an idea about the parameters I've to pass to FireEvent functions?
Thanks
I'm trying to simulate a button click server side.
I have the code of the editable grid panel sample on Ext.Net web site plus I have added a button to insert a new row:
<ext:GridPanel
ID="extGridPanel"
......
<Store>
<ext:Store ID="Store1" runat="server">
<Reader>
...
</Reader>
<Listeners>
<Add Fn="addEditing" />
...
</Listeners>
</ext:GridPanel>
<ext:Button runat="server" ID="btnGridPanelInsert" Text="Insert" Icon="Add">
<Listeners>
<Click Handler="#{extGridPanel}.insertRecord(0, {});#{extGridPanel}.getView().focusRow(0);#{extGridPanel}.startEditing(0, 0);" />
</Listeners>
</ext:Button>
When I click on the insert button, it works perfectly. Now I would simulate the insert button click by server side code.
I've tried with the following:
btnGridPanelInsert.FireEvent("Click", "new object[0]");
andbtnGridPanelInsert.FireEvent("Click", "#{extGridPanel}.insertRecord(0, {});#{extGridPanel}.getView().focusRow(0);#{extGridPanel}.startEditing(0, 0);");
but it does not work.Do you have an idea about the parameters I've to pass to FireEvent functions?
Thanks