Click here to Skip to main content
15,891,423 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have two gridview first contains page headers and second contains page name under headers. now i want to save pages with header on save button click .please give me code. Both grid view contains Checkboxex.
Posted
Updated 15-Mar-12 18:42pm
v2

1 solution

On binding different columns to different gridview, we can achieve it. Here is the sample code:

C#
public Datatable BindData(int productid)
{
Datatable dt;
...

"Select [PageHeader], [PageName] from Pages WHERE ProductID ="+@productid;
return dt;
}

//Now call this method to your gridview's with id as below:
GridViewHead.Datasource=BindData(1);
GridViewHead.DataBind();

GridViewName.Datasource=BindData(2);
GridViewName.DataBind(); 
 
Share this answer
 
Comments
Ravi shekahr 16-Mar-12 0:42am    
Please Give me complete code..

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