Click here to Skip to main content
15,861,172 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have one gridview and a textbox and button
what i want is if i enter 3 in textbox and click on button 3 gridviews to be displayed side by side
any body give me examples or give me any idea
Posted

1 solution

Please refer this code


<asp:panel id="panel1" runat="server" xmlns:asp="#unknown">



Button click event

{

for (int i=0; i< convert.toInt(TextBox.Text) ; i++)
{
GridView gv = new GridView();
gv.ID="gridview_"+ i;
gv.DataSource = //Whatever data source you want to assign
gv.Databind();
panel1.controls.add(gv);

}
}
 
Share this answer
 

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