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

  • Home
  • SEARCH
  • 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 7611441
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T01:40:08+00:00 2026-05-31T01:40:08+00:00

I have in my grid a ImageButton in each rows. When i click on

  • 0

I have in my grid a ImageButton in each rows. When i click on it, i need to retrieve the ID of the selected row.

My grid is fulfilled using an ObjectDataSource.

This is the column i’m talking about:

        <telerik:GridTemplateColumn UniqueName="ImageColumnDetails">
            <ItemTemplate>
                <asp:ImageButton ID="ImageButtonDetails" runat="server" ImageUrl="~/img/cle-outil_white.gif"
                     ToolTip="Détails du ticket"
                     OnClientClick='<%# Eval("idAgir","openRadWin({0})") %>;return false;'/>
            </ItemTemplate>
        </telerik:GridTemplateColumn>

As you see, i need to specify the IdAgir in my aspx page to pass it by URL to a JS function.
Thank you for your help

  • 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-31T01:40:09+00:00Added an answer on May 31, 2026 at 1:40 am

    Make sure to include idAgir in your DataSource, going with the implementation you’re attempting this should work:

    <telerik:GridTemplateColumn UniqueName="ImageColumnDetails">
         <ItemTemplate>
               <asp:ImageButton ID="ImageButtonDetails" runat="server" ImageUrl="~/img/cle-outil_white.gif"
                             ToolTip="Détails du ticket"
                             OnClientClick='<%# String.Format("openRadWin({0});return false;",DataBinder.Eval(Container,"DataItem.idAgir"))%> '/>
          </ItemTemplate>
     </telerik:GridTemplateColumn>
    

    –

    I personally usually use this approach, and modify my columns on the server side, but I don’t really see the difference.

    <telerik:GridTemplateColumn HeaderText="User Name" UniqueName="UserName" SortExpression="UserName">
         <ItemTemplate>
             <asp:HyperLink ID="UserNameLink" runat="server" CssClass="lnkAction icon_toolbar_edit_blue"></asp:HyperLink>
         </ItemTemplate>
    </telerik:GridTemplateColumn>
    
    
    protected void radGrid_ItemCreated(object sender, GridItemEventArgs e)
        {
    
            if (e.Item is GridDataItem)
            {
                var dataBoundItem = e.Item as GridDataItem;
                HyperLink userNameLink = (HyperLink)dataBoundItem.FindControl("UserNameLink");
                userNameLink.Attributes["href"] = "#";
                userNameLink.Attributes["onclick"] = String.Format("selectRow('{0}');return ShowEditUser('{1}');", dataBoundItem.ItemIndex, dataBoundItem.OwnerTableView.DataKeyValues[dataBoundItem.ItemIndex]["id"]);
                userNameLink.Text = dataBoundItem.OwnerTableView.DataKeyValues[dataBoundItem.ItemIndex]["UserName"].ToString();
            }
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a gridview control with delete asp:ImageButton for each row of the grid.
I have a Grid inside a Canvas defined like this: <Canvas x:Name=outerCanvas> <Grid Grid.Row=1
I have Grid with 10 rows and 10 column, and I want in code
Hai presently i have grid like this. <Grid Name=tGrid1 Grid.Row=0 Background=Black > </Grid> <Grid
I have a Grid with 5 rows and 5 columns. I creating this Grid
I have grid view with three column name, rate, category I am also using
I have grid like this. How to change index for each element, i.e. to
I have Grid with rowexpander. with this I am able to expand the row,
I am using vb.net code. I have grid view, please see the code below:
I have a grid and I need to dynamically replace a control that resides

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.