Click here to Skip to main content
15,910,981 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Linkbutton commandeventargs as follows

C#
protected void lnkCbndate_click(object sender, CommandEventArgs e)
      {
         
          how to call gridview in link button commandEventargs
      } 


for that how can i call gridview in link button command event args

please help me.
Posted
Updated 14-Jul-15 22:44pm
v3
Comments
Er Daljeet Singh 15-Jul-15 3:14am    
What do you mean by calling Gridview in link button?
Please elaborate what you want to do.

First downcast the event of the button

C#
LinkButton btn= (LinkButton)sender;
GridViewRow row = (GridViewRow)btn.NamingContainer;
 
Share this answer
 
using find control option you can find any control with in grid view

Accessing the different controls inside a GridView control[^]
 
Share this answer
 
v2

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900