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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:57:09+00:00 2026-05-26T11:57:09+00:00

I am working on a project using Telerik controls. I’m trying to figure out

  • 0

I am working on a project using Telerik controls. I’m trying to figure out how to get the selected row index on an ItemTemplate button click event, like in the markup below:

<telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" 
    DataSourceID="cusGrid" GridLines="None" Skin="Default" AllowPaging="True" DataKeyValue="CustomerID" 
    PageSize="500" AllowMultiRowSelection="True" ShowStatusBar="true" >
        <MasterTableView AutoGenerateColumns="False" DataKeyNames="CustomerID" DataSourceID="cusGrid">
            <RowIndicatorColumn>
                <HeaderStyle Width="20px"></HeaderStyle>
            </RowIndicatorColumn>
            <ExpandCollapseColumn>
                <HeaderStyle Width="20px"></HeaderStyle>
            </ExpandCollapseColumn>
            <Columns>
                <telerik:GridTemplateColumn UniqueName="CheckBoxTemplateColumn">
                    <ItemTemplate>
                        <asp:Button runat="server" Text="Select" OnClick="SelRecord" />
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
    ...

Normally with a GridView I would just do something like:

protected void SelRecord(object sender, EventArgs e)
{
    var gRow = (GridViewRow)(sender as Control).Parent.Parent;
    var key = string.Empty;
    if (gRow != null) { key = gRow.Cells[0].Text; }
}

What is the equivalent with the Telerik control?

  • 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-26T11:57:10+00:00Added an answer on May 26, 2026 at 11:57 am

    You can use CommandName="" instead of OnClick.

    Also add onitemdatabound="RadGrid1_ItemDataBound" to the main telerik:RadGrid tag.

    Then in the code behind:

    protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridDataItem)
        {
            GridDataItem dataItem = e.Item as GridDataItem;
    
                    int selectedRowIndex = dataItem.RowIndex;
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on project using MVC 3.0(Razor framework). I am trying to get
I am trying to get the localization for my MVC project working with our
I am working on a project using Spring Web Flow 2.0. I am trying
I'm currently working on a project at work, and we are using the Telerik
I'm working on a project using Windows 2008, .NET 3.5 and WCF for some
I am working on a project using rails 2.1.1. With the new release of
I am working on a project using Castle Active Record. I stumbled across the
I'm working on a project using C++, Boost, and Qt. I understand how to
I am working on a project using Groovy, and I would like to take
I'm working on a project using Scala running Selenium tests as part of a

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.