This is a migrated thread and some comments may be shown as answers.

RadGrid ItemCommand Event Not Fired

1 Answer 105 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Masterdom5
Top achievements
Rank 1
Masterdom5 asked on 11 Jul 2011, 06:59 PM

Hi,
The ItemCommand on my RadGrid is not firing. Can someone point me in the right directions?

I am using a master page with the following telerik controls:

 

 

<telerik:RadScriptManager ID="DefaultMasterScriptManager" runat="server" EnableHistory="True">

 

 

 

</telerik:RadScriptManager>

 

 

 

<telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true">

 

 

 

</telerik:RadWindowManager>

 

 

 

<telerik:RadAjaxManager ID="RadAjaxManager" runat="server" EnablePageMethods="true"

 

 

 

meta:resourcekey="RadAjaxManagerResource1" />

 

 

 

<telerik:RadAjaxLoadingPanel ID="DefaultLoadingPanel" runat="server" Skin="Default"

 

 

 

Transparency="-100" meta:resourcekey="DefaultLoadingPanelResource1">

 

 

 

</telerik:RadAjaxLoadingPanel>

and the following RadGrid control in a user control. With exception of the buttons the other grid columns are created dynamically as my grid is generic grid that serves many other user controls:

 

<

 

telerik:RadGrid ID="EventItemsGrid"

 

 

runat="server"

 

 

DataSourceID="EventItemsDataSource"

 

 

AllowAutomaticInserts="True"

 

 

AllowAutomaticUpdates="True"

 

 

AllowAutomaticDeletes="True"

 

 

AllowPaging="True"

 

 

EnableHeaderContextMenu="False"

 

 

AllowMultiRowSelection="false"

 

 

meta:resourcekey="LinkedEventsGridResource1"

 

 

AutoGenerateColumns="false"

 

 

AutoGenerateEditColumn="false"

 

 

AutoGenerateDeleteColumn="false"

 

 

OnItemCommand="EventItemsGrid_ItemCommand"

 

 

OnItemCreated="EventItemsGrid_ItemCreated"

 

 

OnUpdateCommand="EventItemsGrid_UpdateCommand"

 

 

OnItemDataBound="EventItemsGrid_ItemDataBound"

 

 

PageSize="5" width="100%" height="300px">

 

 

 

<headercontextmenu>

 

 

 

<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>

 

 

 

</headercontextmenu>

 

 

 

<clientsettings EnablePostBackonRowClick="true">

 

 

 

<Selecting AllowRowSelect="true"/>

 

 

 

<Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="True" />

 

 

 

</clientsettings>

 

 

 

<sortingsettings sortedbackcolor="White" />

 

 

 

<pagerstyle alwaysvisible="true" mode="NextPrevAndNumeric" position="Bottom" wrap="false" />

 

 

 

<filtermenu>

 

 

 

<CollapseAnimation Type="OutQuint" Duration="50"></CollapseAnimation>

 

 

 

</filtermenu>

 

 

 

<groupingsettings showungroupbutton="true" />

 

 

 

<mastertableview datakeynames="EventId" clientdatakeynames="EventId" datasourceid="EventItemsDataSource" commanditemdisplay="Bottom" tablelayout="Fixed" grouploadmode="Client" gridlines="None">

 

 

 

<Columns>

 

 

 

<telerik:GridButtonColumn UniqueName="DeleteCommandColumn" ButtonType="ImageButton" HeaderText="Remove" Text="Remove" CommandName="Delete" ConfirmText="Are you sure you want to remove [{0}] from the [{1}] role?" ConfirmTitle="Remove Confirmation" ConfirmDialogType="RadWindow" meta:resourcekey="DeleteColumnResource1">

 

 

 

<HeaderStyle Width="60px" />

 

 

 

<ItemStyle HorizontalAlign="Center" />

 

 

 

</telerik:GridButtonColumn>

 

 

 

<telerik:GridButtonColumn UniqueName="EditCommandColumn" ButtonType="ImageButton" HeaderText="Edit" Text="Edit" CommandName="Select" meta:resourcekey="GridEditButtonImageResource1" ImageUrl="../Resources/WebResource.gif">

 

 

 

<HeaderStyle Width="60px" />

 

 

 

<ItemStyle HorizontalAlign="Center" />

 

 

 

</telerik:GridButtonColumn>

 

 

 

<telerik:GridButtonColumn UniqueName="ShowCommandColumn" ButtonType="LinkButton" HeaderText="" Text="Show Details" CommandName="Select" visible="false" meta:resourcekey="GridViewDetailResource1">

 

 

 

<HeaderStyle Width="100px" />

 

 

 

<ItemStyle HorizontalAlign="Center" />

 

 

 

</telerik:GridButtonColumn>

 

 

 

</Columns>

 

 

 

<CommandItemTemplate>

 

 

 

<table style="width:100%; text-align:right;">

 

 

 

<tr><td><asp:LinkButton runat="server" ID="lnkAddNewRecord" Text="Add New Record"></asp:LinkButton></td></tr>

 

 

 

</table>

 

 

 

</CommandItemTemplate>

 

 

 

<PagerStyle AlwaysVisible="True"></PagerStyle>

 

 

 

</mastertableview>

 

 

 

</telerik:RadGrid>

Thank you in advance!

Masterdom5

 

1 Answer, 1 is accepted

Sort by
0
Marin
Telerik team
answered on 14 Jul 2011, 01:10 PM
Hello,

 I checked your code but the ItemCommand event fired on my side. Can you verify that you do not have some additional settings or logic in the code-behind that can cause such behavior. If the problem persists please try isolating the issue in a separate sample project and send it to us so we can investigate it on our side.

Regards,
Marin
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
Grid
Asked by
Masterdom5
Top achievements
Rank 1
Answers by
Marin
Telerik team
Share this question
or