Click here to Skip to main content
12,349,911 members (23,096 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C# SQL-Server SQL-Server-2008 , +
How to find an image button placed inside a gridview control which is in a tab container.I need to display images on the screen in a gridview.

kindly send me the code for the above as soon as possible.

Thank you
Ancie Varghese
Posted 11-Sep-12 22:39pm

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

hi,

try this,

GridView grd  = (GridView)tabContainer1.SelectedTab.FindControl("GRidView1");
ImageButton imgBtn = (ImageButton)grd.Items[0].FindControl("ImageBtnID");
 
//This will find the image button contain in first row of the grid view. similarly you can find other controls

//your code goes here
Hope it works.
  Permalink  
Comments
Ancie Varghese 12-Sep-12 4:53am
   
hi karthik,i tried that code but it dint work.It'll find the grid but not the imagebutton inside the grid.please reply if you have any other suggestions.Thank you
Karthik Harve 12-Sep-12 4:55am
   
Where exactly your image button. is it in ItemTemplate of the gird ?
Ancie Varghese 17-Sep-12 6:44am
   
karthik sorry for the delay, the image button is placed inside the gridview.the gridview is inside a tab container.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.160621.1 | Last Updated 12 Sep 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100