PDA

View Full Version : Problem in gridpanel in v2.0



Oliver
Mar 30, 2012, 6:45 PM
Hello!

I upgraded my application to the version 2.0 and now I have a problem in gridpanel direct events.

My old code is:



<ColumnModel ID="ColumnModel1" runat="server">
<Columns>
<ext:RowNumbererColumn runat="server"/>
<ext:CommandColumn Width="133" Header="" Align="Center" Sortable="false" runat="server">
<Commands>
<ext:GridCommand CommandName="Alterar" Icon="TableEdit" ToolTip-Text="Alterar" />
</Commands>
</ext:CommandColumn>

...

<DirectEvents>
<Command OnEvent="ShowDetails" Buffer="250">
<EventMask ShowMask="true" />
<ExtraParams>
<ext:Parameter Name="command" Value="command" Mode="Raw" />
<ext:Parameter Name="id" Value="record.id" Mode="Raw" />
</ExtraParams>
</Command>
</DirectEvents>
</ext:GridPanel>



Now the tag <Command> in <DirectEvents> is not supported. How can I do the same code in v2.0?

Tks in advance.

Vladimir
Mar 30, 2012, 6:57 PM
Use Command direct event of CommandColumn
See
http://examples2.ext.net/#/GridPanel/Commands/Row_Command/

Oliver
Apr 02, 2012, 2:38 AM
Use Command direct event of CommandColumn
See
http://examples2.ext.net/#/GridPanel/Commands/Row_Command/

Hi Vladimir, thanks for the reply.

I did transfer the code to CommandColumn and works. After that when i ran the application I received an error message about null extraparams. I changed the code as follow and works fine.



<Listeners>
<Command Handler="App.direct.ShowDetails(command, record.data.IdEmpresa);" />
</Listeners>
</ext:CommandColumn>


You can mark as closed.

Thanks for the help.