Click here to Skip to main content
11,439,025 members (77,557 online)
Rate this: bad
good
Please Sign up or sign in to vote.
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 23: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 at 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 at 12-Sep-12 4:55am
   
Where exactly your image button. is it in ItemTemplate of the gird ?
Ancie Varghese at 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)



Advertise | Privacy | Mobile
Web04 | 2.8.150506.1 | Last Updated 12 Sep 2012
Copyright © CodeProject, 1999-2015
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