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

ItemCommand not firing on RadGrid

2 Answers 284 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Viji
Top achievements
Rank 1
Viji asked on 22 Aug 2008, 04:28 PM

Hi,

The ItemCommand on my RadGrid is not firing. I tried using grid from
Telerik.WebControls as well as Telerik.Web.UI.

Here is my sample page.
Please help

Thanks
Viji

<%

@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>
<%
@ Register Assembly="RadGrid.Net2" Namespace="Telerik.WebControls" TagPrefix="radG" %>
<%
@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%
@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Namespace="System.Web.UI" TagPrefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml" >

<

head runat="server">
<title>Untitled Page</title>
</
head>
<
body>
<form id="form1" runat="server">
&nbsp;&nbsp;<br />
<radG:RadGrid ID="RadGrid1" runat="server" EnableAJAX="True" GridLines="None" OnItemCommand="RadGrid1_ItemCommand"
OnNeedDataSource="RadGrid1_NeedDataSource" Style="z-index: 100; left: 9px; position: absolute;top: 71px">
<ExportSettings>
<Pdf PageBottomMargin="" PageFooterMargin="" PageHeaderMargin="" PageHeight="11in"
PageLeftMargin="" PageRightMargin="" PageTopMargin="" PageWidth="8.5in" />

</ExportSettings>

<ClientSettings>

<Selecting AllowRowSelect="True" />

</ClientSettings>

<MasterTableView>

<RowIndicatorColumn Visible="False">

<HeaderStyle Width="20px" />

</RowIndicatorColumn>

<ExpandCollapseColumn Resizable="False" Visible="False">

<HeaderStyle Width="20px" />

</ExpandCollapseColumn>

</MasterTableView>

</radG:RadGrid>

<asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile="~/App_Data/PatientTest.xml">

</asp:XmlDataSource>

</form>

</

body>

</

html>

2 Answers, 1 is accepted

Sort by
0
Accepted
Daniel
Telerik team
answered on 22 Aug 2008, 06:33 PM
Hello Viji,

Please check whether the ItemCommand is firing as expected in the attached sample website.

Regards,
Daniel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Viji
Top achievements
Rank 1
answered on 22 Aug 2008, 07:36 PM
Hi Daniel,

I didn't set EnablePostBackonRowClick. When I did that it worked.

Thanks
Viji
Tags
Grid
Asked by
Viji
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Viji
Top achievements
Rank 1
Share this question
or