Welcome Guest Search | Active Topics | Sign In | Register

Grid's ItemCommand does not occurs Options
Alejandro M. Biondo
Posted: Tuesday, June 15, 2010 11:26:57 AM
Rank: Newbie
Groups: Member

Joined: 5/10/2010
Posts: 9
Hi, I have the following aspx code:

<eo:Grid ID="gridCP" runat="server" BorderColor="#7F9DB9" BorderWidth="1px" ColumnHeaderAscImage="00050104" ColumnHeaderDescImage="00050105" ColumnHeaderDividerImage="00050103" FixedColumnCount="1" Font-Bold="False" Font-Italic="False" Font-Names="Tahoma" Font-Overline="False" Font-Size="8.75pt" Font-Strikeout="False" Font-Underline="False" GoToBoxVisible="True" GridLineColor="220, 223, 228" GridLines="Both" Height="200px" Width="444px" EnableTheming="True">
<FooterStyle CssText="padding-bottom:4px;padding-left:4px;padding-right:4px;padding-top:4px;" />
<ItemStyles>
<eo:GridItemStyleSet>
<ItemStyle CssText="background-color: white" />
<ItemHoverStyle CssText="background-color: whitesmoke" />
<SelectedStyle CssText="background-color: #316ac5; color: white" />
<FixedColumnCellStyle CssText="border-right: #d6d2c2 1px solid; padding-right: 10px; border-top: #faf9f4 1px solid; border-left: #faf9f4 1px solid; border-bottom: #d6d2c2 1px solid; background-color: #ebeadb; text-align: right; color: black;" />
<CellStyle CssText="padding-left:8px;padding-top:2px;white-space:nowrap;" />
</eo:GridItemStyleSet>
</ItemStyles>
<ContentPaneStyle CssText="border-bottom-color:#7f9db9;border-bottom-style:solid;border-bottom-width:1px;border-left-color:#7f9db9;border-left-style:solid;border-left-width:1px;border-right-color:#7f9db9;border-right-style:solid;border-right-width:1px;border-top-color:#7f9db9;border-top-style:solid;border-top-width:1px;" />
<GoToBoxStyle CssText="BORDER-RIGHT: #7f9db9 1px solid; BORDER-TOP: #7f9db9 1px solid; BORDER-LEFT: #7f9db9 1px solid; WIDTH: 40px; BORDER-BOTTOM: #7f9db9 1px solid" />
<Columns>
<eo:RowNumberColumn Width="50">
</eo:RowNumberColumn>
<eo:MaskedEditColumn DataField="strCodigoPostal" HeaderText="C&#243;digo Postal" Name="">
<MaskedEdit ControlSkinID="None" runat="server">
<eo:MaskedEditSegment IsRequired="True" Mask="00000" SegmentType="Mask" />
</MaskedEdit>
</eo:MaskedEditColumn>
<eo:MaskedEditColumn DataField="numCantidad" HeaderText="Cantidad" Width="90">
<MaskedEdit ControlSkinID="None" runat="server">
<eo:MaskedEditSegment IsRequired="True" MaxValue="99999" SegmentType="Number" />
</MaskedEdit>
</eo:MaskedEditColumn>
<eo:MaskedEditColumn DataField="numDisponibles" HeaderText="Disponibles" Width="90">
<MaskedEdit ControlSkinID="None" runat="server">
<eo:MaskedEditSegment IsRequired="True" MaxValue="99999" SegmentType="Number" />
</MaskedEdit>
</eo:MaskedEditColumn>
<eo:DeleteCommandColumn DeleteText="&#160;&#160;&#160;&#160;&#160;" Name="" Width="50">
<ButtonStyle CssText="background-color:#e0e0e0;background-image:url('00000208');color:white;" />
</eo:DeleteCommandColumn>
<eo:ButtonColumn ButtonText="Lib." ButtonType="PushButton">
</eo:ButtonColumn>
</Columns>
<ColumnHeaderStyle CssText="background-image:url('00050101');padding-left:8px;padding-top:3px;" />
</eo:Grid>


Then I have the following on the .aspx.net.

Protected Sub cmdName(ByVal s As Object, ByVal e As EO.Web.GridCommandEventArgs) Handles gridCP.ItemCommand
dm = Session("dm")
........
End Sub


But when I push the "Lib." button it never goes to the cmdName method (I put a breakpoint to confirm it).

What am I doing wrong?

eo_support
Posted: Tuesday, June 15, 2010 11:41:54 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Try to set the Grid's RunningMode to Server. A ButtonColumn triggers ItemCommand event when the Grid is in Server or Callback running mode. If the Grid is in Client running mode (this is the default value) it calls ClientSideOnItemCommand JavaScript event handler.

Thanks!
Alejandro M. Biondo
Posted: Wednesday, June 16, 2010 6:57:26 AM
Rank: Newbie
Groups: Member

Joined: 5/10/2010
Posts: 9
Yes, you are right. I don't know why, but I assumed that it was in Server RunningMode.

Thank you, now works fine.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.