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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T22:53:05+00:00 2026-05-30T22:53:05+00:00

<telerik:RadGrid ID=RGStyleGuideRestrictions runat=server DataSourceID=SqlDataSource1 OnItemCommand=RGStyleGuideRestrictions_ItemCommand <MasterTableView DataSourceID=SqlDataSource1 DataKeyNames=TerritoryReportGroup> <Columns> <telerik:GridTemplateColumn UniqueName=TemplateColumn> <ItemTemplate> <asp:ImageButton ID=imgBtn1

  • 0
<telerik:RadGrid ID="RGStyleGuideRestrictions" runat="server" DataSourceID="SqlDataSource1"
                OnItemCommand="RGStyleGuideRestrictions_ItemCommand"

    <MasterTableView DataSourceID="SqlDataSource1" DataKeyNames="TerritoryReportGroup">

      <Columns>
        <telerik:GridTemplateColumn UniqueName="TemplateColumn">
            <ItemTemplate>                
                <asp:ImageButton ID="imgBtn1" runat = "server"/> 
                <asp:ImageButton ID="imgBtn2" runat = "server"/>                     
            </ItemTemplate>
        </telerik:GridTemplateColumn>
      </Columns>
    </MasterTableView>
</telerik:RadGrid>

In CODE-BEHIND:-

protected void RGStyleGuideRestrictions_ItemCommand(object source, GridCommandEventArgs e)
{
   ImageButton imgBtn1 = e.item.FindControl("imgBtn1") as ImageButton;
   ImageButton imgBtn2 = e.item.FindControl("imgBtn2") as ImageButton;
}

QUESTION:- Now, click of any of the ImageButton fires the ItemCommand event. I want to find out or fetch the ID of that ImageButton(1 or 2) in codebehind, which fired the ItemCommand.

Please suggest what to do for that. I am clue less.

  • 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-30T22:53:06+00:00Added an answer on May 30, 2026 at 10:53 pm

    Have you tried applying CommandNames to your imagebuttons?

     <asp:ImageButton ID="imgBtn1" runat = "server" CommandName="imgAction1"/> 
     <asp:ImageButton ID="imgBtn2" runat = "server" CommandName="imgAction2"/> 
    

     protected void RGStyleGuideRestrictions_ItemCommand(object source, GridCommandEventArgs e)
     {
          switch(e.CommandName)
          {
             case "imgAction1": // do stuff here
                 break;
             case "imgAction2": // do some other stuff here
                 break;
          }
     } 
    

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

Sidebar

Related Questions

My Telerik:RadGrid tag : <telerik:RadGrid ID=grdSettlement runat=server AllowFilteringByColumn=True DataSourceID=SqlDataSource1 AllowAutomaticDeletes=True AllowAutomaticUpdates=True AllowAutomaticInserts=true OnInsertCommand=grdSettlement_InsertCommand> My
I have the following code in my aspx page (simplified): <telerik:RadGrid ID=rgd_grid runat=server> <MasterTableView>
my radgrid column like below : <telerik:GridTemplateColumn FilterControlAltText=Filter TemplateColumn_Benefit DataField=Benefit HeaderText=Benefit UniqueName=TemplateColumn_Benefit FilterImageToolTip=Filter> <ItemTemplate>
I have a Telerik RadGrid with a GridTemplateColumn that contains a checkbox, as follows:
There are so many columns on my Telerik RadGrid that I want to make
I have a Telerik RadGrid and its columns are generated. The RadGrid is hierarchical
I have problems binding both a telerik RadGrid and a plain vanilla ASP.NET GridView
Ive no problems using Javascript to read the rows of a telerik radgrid component
I have some boiler-plate script required for a Telerik RadGrid on one of my
I'm customising the Group Headers on a Telerik RadGrid by injecting a LinkButton into

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.