Jul 12, 2013, 12:40 PM
[CLOSED] Gridcommand listener and Rowselection directevent
Hi,
is there a way to call a javascript function on a GridCommand or ImageCommand inside a Grid
without calling the directevent associated to the rowselection as well?
I mean. I have this Grid:
of the row selection.
Is there a way to avoid this? I would like that when I click the GridCommand only the javascript testfunction is executed.
Thanks
is there a way to call a javascript function on a GridCommand or ImageCommand inside a Grid
without calling the directevent associated to the rowselection as well?
I mean. I have this Grid:
<ext:GridPanel runat="server" ID="templategrid" AutoScroll="true" StoreID="TemplateStore" Height="400">
<ColumnModel>
<Columns>
<ext:CommandColumn ID="colEditTemplate" Width="25" runat="server" OverOnly="True">
<Commands>
<ext:GridCommand Icon="Pencil" CommandName="cmdEditTemplate">
<ToolTip Text="<%$ I18n: EditText %>" />
</ext:GridCommand>
</Commands>
<Listeners>
<Command Handler="return testfunction(record, command); return false;"></Command>
</Listeners>
</ext:CommandColumn>
<%--Fields for List Mode--%>
<ext:Column ID="colId" runat="server" DataIndex="Id" Hidden="True" />
<ext:Column ID="colDescription" runat="server" DataIndex="Description" Header="<%$ I18n: Label_Description %>" Width="400" Groupable="true" Sortable="true" MenuDisabled="False" />
</Columns>
</ColumnModel>
<%--Selection Model--%>
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel1" runat="server" Mode="Single">
<DirectEvents>
<Select OnEvent="GetTemplateBlocks">
<EventMask ShowMask="true" />
<ExtraParams>
<ext:Parameter Name="TemplateId" Value="record.data.Id" Mode="Raw" />
</ExtraParams>
</Select>
</DirectEvents>
</ext:RowSelectionModel>
</SelectionModel>
</ext:GridPanel>
When I click the gridcommand icon, the testfunction in javascript is called but is called also the code behind directevents GettemplateBlocksof the row selection.
Is there a way to avoid this? I would like that when I click the GridCommand only the javascript testfunction is executed.
Thanks
Last edited by Daniil; Jul 17, 2013 at 3:23 PM.
Reason: [CLOSED]