Click here to Skip to main content
15,886,857 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
please give me the solution if any..
Posted
Comments
Dinesh.V.Kumar 14-Feb-14 2:23am    
Can you tell us the purpose of passing the control to the function????

If you need to do something with the data displayed in the grid view, then send the data table bound to the grid...do some modification and then rebind the modified datatable to the grid...

Regards
Ni!E$H_WAGH 14-Feb-14 2:26am    
thanks.
Can you please provide me some demo code snippet for the same

1 solution

here is one simple example in below code one hyperlink inside gridview and is bind with coulmn..like this

<asp:hyperlink id="a_main_menu" runat="server" href="<%# DataBinder.Eval(Container.DataItem, "page").ToString()%>" xmlns:asp="#unknown"><![CDATA[<%# DataBinder.Eval(Container.DataItem, "menu_name").ToString()%> </asp:hyperlink>


and then ondatabound event chnaging the navigation like this..

C#
protected void grid_menu_DataBound(object sender, RepeaterItemEventArgs e)
  {

      HyperLink a_id = (HyperLink)e.Row.FindControl("a_main_menu");
      a_id.NavigateUrl = "other_page.aspx";
  }


may this will help u..
 
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