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

[Solved] RadGrid onitemcommand not firing on Chrome

1 Answer 83 Views
Grid
This is a migrated thread and some comments may be shown as answers.
rj caraan
Top achievements
Rank 1
rj caraan asked on 08 Oct 2009, 07:22 AM
Hi please help me..

I have a link button with a command name of "EditDateTime" it doesnt fire the onitemcommand event on CHROME. It works fine on other browsers.

    protected void grdSurvey_ItemCommand(object source, GridCommandEventArgs e)
    {
    if (e.CommandName == "EditDateTime")
        {
        }
}

Thanks!

1 Answer, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 09 Oct 2009, 08:42 AM
Hello,

The following code works on all browsers:
/markup/
<form id="form1" runat="server">
    <asp:ScriptManager runat="server" ID="ScriptManager1"></asp:ScriptManager>
    <div>
        <telerik:RadGrid runat="server" ID="RadGrid1">
            <MasterTableView>
                <Columns>
                    <telerik:GridButtonColumn CommandName="CustomCommand" Text="My button">
                    </telerik:GridButtonColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>
    </div>
    </form>

/code/
01.protected void Page_Load(object sender, EventArgs e)
02.{
03.    RadGrid1.NeedDataSource += (s, arg) =>
04.        {
05.            (s as RadGrid).DataSource = new object[] { 1,2,3,4,5};
06.        };
07.    RadGrid1.ItemCommand += (s, arg) =>
08.        {
09.            Response.Write(String.Format("{0}<br/>", arg.CommandName));
10.        };
11.}


Regard,
Nikolay
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
rj caraan
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Share this question
or