Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6895069
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:51:42+00:00 2026-05-27T06:51:42+00:00

i have a rad grid with the following code <telerik:GridTemplateColumn> <ItemTemplate> <asp:LinkButton ID=Delete Text=Remove

  • 0

i have a rad grid with the following code

 <telerik:GridTemplateColumn>
   <ItemTemplate>
   <asp:LinkButton ID="Delete" Text="Remove &raquo" 
    CommandArgument='<%# Eval("ApartmentId") %>'
     CommandName="RemoveItem" CssClass="Button" runat="server" />
      </ItemTemplate>
   </telerik:GridTemplateColumn>

and .CS code as follows

protected void radGrid_RowCommand(object sender, GridViewCommandEventArgs e)
{
    if (e.CommandName == "Page")
    {
    }
    else
    {
        if (e.CommandName == "RemoveItem")
        {
           Apartments apartAdmin = new Apartment();
           bool deleted = apartAdmin.Delete(int.Parse(e.CommandArgument.ToString()); 
            if (deleted)
            {
                radGrid.Rebind();
            }
        }
    }
}

My problem is that when I debug it, say I add the breakpoint to this event, it is never fired, is like if it does not see the event for some reason… Can anyone see what the problem may be? This is the mark up of the grid at the top

 <telerik:RadGrid ID="radGrid" ShowFooter="true" ShowHeader="true" CaptionAlign="Left"
  runat="server" ForeColor="Black" CellPadding="4" AutoGenerateColumns="False"
  CssClass="Grid" Width="100%" GridLines="None" OnRowCommand="radGrid_RowCommand"
  OnNeedDataSource="radGrid_NeedDataSource" AllowPaging="True" AllowSorting="true">
  <MasterTableView DataKeyNames="ApartmentID,ApartmentTypeID">
      <CommandItemSettings ShowRefreshButton="true" ShowAddNewRecordButton="false" />
          <Columns>
           <telerik:GridTemplateColumn>
       <ItemTemplate>
       <asp:LinkButton ID="Delete" Text="Remove &raquo" 
        CommandArgument='<%# Eval("ApartmentId") %>'
         CommandName="RemoveItem" CssClass="Button" runat="server" />
          </ItemTemplate>
       </telerik:GridTemplateColumn>
        </Columns>
          <NoRecordsTemplate>
            No related items found</NoRecordsTemplate>
       </MasterTableView>
                    <FooterStyle CssClass="FooterStyle" />
                    <ItemStyle CssClass="RowStyle" />
                    <HeaderStyle CssClass="HeaderStyle" />
                    <AlternatingItemStyle CssClass="AlternatingRowStyle" />
                    <PagerStyle CssClass="PagerStyle" FirstPageText="First" LastPageText="Last" Mode="NextPrevAndNumeric"
                        AlwaysVisible="true" />
                </telerik:RadGrid>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T06:51:43+00:00Added an answer on May 27, 2026 at 6:51 am

    You have a linkbutton inside an itemtemplate, add a handler for OnClick on the linkbutton itself and the event will surely be fired.

    For example:

    protected void LinkButton1_Click(Object sender, EventArgs   
     {
             LinkButton button = sender as LinkButton;
              Apartments apartAdmin = new Apartment();
               bool deleted = apartAdmin.Delete(int.Parse(button.CommandArgument.ToString()); 
                if (deleted)
                {
                    radGrid.Rebind();
                }
    
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a rad grid where I can insert/update and delete items of data.
I have a telerik rad grid with PageSize=10. The problem is if I have
I have the following code in my aspx page (simplified): <telerik:RadGrid ID=rgd_grid runat=server> <MasterTableView>
I have a Telerik RadGrid with a GridTemplateColumn that contains a checkbox, as follows:
I have problems binding both a telerik RadGrid and a plain vanilla ASP.NET GridView
I have a Telerik RadGrid which is composed of rows of checkboxes and text.
I have a Telerik RadGrid. The initial DataSource that is bound to the grid
I have a query in regards to a Telerik RadGrid in ASP.NET. I have
I'm really new to asp.net and Telerik... I have a RadGrid with filtering. I
I have the following acceptance criteria for creating a pdf file from my asp.net

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.