This is a migrated thread and some comments may be shown as answers.
GridTemplate Column with LinkButton not firing OnItemCommand
1 Answer 5 Views
This is a migrated thread and some comments may be shown as answers.
Rodney
Top achievements
Rank 2
Rodney asked on 03 Oct 2017, 12:25 PM

I've done this several times in the past, but the one I just added will not work. I have a GridTemplateColumn with several LinkButtons with various CommandNames and CommandArguments. When you click on the link nothing happens, the OnCommandItem code is never hit. I'm not sure what I'm missing, I even have another one on t

 

Heres the code and the markup

 

protected void rgTCDashboard_ItemCommand(object sender, GridCommandEventArgs e)
{
    if (e.Item is GridDataItem)
    {
        GridDataItem item = (GridDataItem)e.Item;
        switch (e.CommandName)
        {
            case "E2IAdd":
                setUpRadWindow(e);
                PageHelper.rwShowOpen(rwCERActivities.ClientID, this.Page);
                break;
            case "VREAdd":
                setUpRadWindow(e);
                PageHelper.rwShowOpen(rwCERActivities.ClientID, this.Page);
                break;
            case "VREPending":
                setUpRadWindow(e);
                PageHelper.rwShowOpen(rwCERActivities.ClientID, this.Page);
                break;
 
        }
    }
}

 

<telerik:GridTemplateColumn HeaderText="VR&E 1-on-1" UniqueName="VRE" AllowSorting="false" AllowFiltering="false" 
    ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center">
    <ItemTemplate>
        <asp:Image ID="imgVRE" runat="server" Visible='<%# (string)Eval("VRE") == "Done" %>' ImageUrl="../../Images/CheckMarkMedium.png"  />
        <asp:LinkButton ID="lkbVREAdd" runat="server" Text="Add" Visible='<%# (string)Eval("VRE") == "Add" %>' CommandArgument='<%# "CerId" %>' CommandName="VREAdd" />
        <asp:LinkButton ID="lkbVREPending" runat="server" Text="Pending" Visible='<%# (string)Eval("VRE") == "Pending" %>' CommandArgument='<%# "CerId" %>' CommandName="VREPending" />

    </ItemTemplate>
</telerik:GridTemplateColumn>

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 06 Oct 2017, 10:36 AM
Hello Rodney,

I've already replied to your query in the official support thread for the same matter. I suggest that we continue our technical conversation on the mentioned thread.

Regards,
Eyup
Progress Telerik
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
Rodney
Top achievements
Rank 2
Answers by
Eyup
Telerik team
Share this question
or