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 6680589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:29:32+00:00 2026-05-26T04:29:32+00:00

I have a RadGrid that contains a template column in which I’ve put two

  • 0

I have a RadGrid that contains a template column in which I’ve put two image buttons for edit and delete actions.

<telerik:GridTemplateColumn HeaderText="Actions">    
   <ItemTemplate>
     <asp:ImageButton ID="btnEdit" runat="server"  ImageUrl="~/images/icon_edit.png" style="display: inline-block" ToolTip="Edit"  />&nbsp;&nbsp;&nbsp;<asp:ImageButton ID="btnDelete" runat="server" ImageUrl="~/images/icon_delete.png" style="display: inline-block" ToolTip="Delete" />
      </ItemTemplate>
</telerik:GridTemplateColumn>

How would get the value of the first cell of the row (datafield = "User_ID") when I click on the "delete" button?

  • 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-26T04:29:32+00:00Added an answer on May 26, 2026 at 4:29 am

    Step 1.

    Go to the Radgrid itself and edit the field DataKeyNames=”” (under MasterTableView) and add the datafield you are pulling:

    <MasterTableView ... DataKeyNames="User_ID">
    

    Step 2.
    Edit the CommandName=”” property of the Imagebuttons located in the grid:

     <asp:ImageButton ID="btnDelete" runat="server" style="display: inline-block" ToolTip="Delete" CommandName="dosomething"/>
    

    Create the following method for your Radgrid and add this code:

    protected void RadGrid1_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
    {
       if (e.CommandName == "dosomething")
        {
            //Use a line of code here to save that User_ID that you want from the first column
            theUserId = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["User_ID"];
        }
    }
    

    Make sure theUserId = the same Type (int,double,dec…) as the field it’s pulling from or you will have to parse it:

    theUserId = Int.Parse(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["User_ID"]);
    

    Let me know if you need more help.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Telerik RadGrid with a GridTemplateColumn that contains a checkbox, as follows:
I know that RadGrid and other RadControls have Culture property which is demonstrated everywhere
I am setting the datasource of my radGrid to a dataset (that I have
I'm trying to add a custom filter to my RadGrid. I have a column,
I have a telerik radgrid that is doing an insert using an objectdatasource. The
I have a Telerik RadGrid that is bound to a Linq Datasource. On the
I have a telerik radgrid that has an allows inserts. After clicking the Add
I have a radgrid controlling access to an application for users. There are two
I have a Telerik RadGrid on my aspx web page. I notice that when
I have a Telerik's RadGrid which has 2 columns like this: <Columns> <telerik:GridBoundColumn HeaderText=AirlineCode

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.