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

Custom Item Button/Command

2 Answers 88 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Josh
Top achievements
Rank 1
Josh asked on 09 Jan 2017, 03:17 AM

I am trying to test the custom command button functionality. The function does not appear to run. 

 

aspx

    <CommandItemSettings ShowAddNewRecordButton="false" ShowRefreshButton="false" />
                <CommandItemTemplate>
                Custom command item template
                <asp:LinkButton ID="TestButton" runat="server" CommandName="Test" >Test</asp:LinkButton>
                <br />
            </CommandItemTemplate>

C#

protected void RadGrid2_ItemCommand(object sender, GridCommandEventArgs e)
    {
        if (e.CommandName == "Test")
        {
            string scriptstring = "radalert('Welcome to Rad<b>window</b>!', 330, 210);";
            ScriptManager.RegisterStartupScript(this, this.GetType(), "radalert", scriptstring, true);
        }
    }

 

 

2 Answers, 1 is accepted

Sort by
0
Josh
Top achievements
Rank 1
answered on 10 Jan 2017, 05:10 AM

-bump

Attached is a sample project. Can you tell me why the event is not firing? 

Thanks

0
Kostadin
Telerik team
answered on 11 Jan 2017, 03:28 PM
Hello Josh,

I would appreciate if we continue our conversation in the support ticket which you have opened with the same requirement.

Regards,
Kostadin
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
Josh
Top achievements
Rank 1
Answers by
Josh
Top achievements
Rank 1
Kostadin
Telerik team
Share this question
or