Click here to Skip to main content
15,888,816 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hai all

i have atextbox control so whati want is if i enter some value in textbox for example if i enter three in textbox 3 gridviws should be displayed side by side

so plz give me any examples or links
Posted

1 solution

Gridviews can be created dynamically.

Use the Placeholder control[^] and create a placeholder on the design page.
Then add gridview controls to this placeholder on demand (based on number of entries in the text box).
E.g.
for(int i=0; i++, i<= numCount)
{
    GridView gv = new GridView();
    gv.ID = "_gridview" + i;
    placeholder1.Controls.Add(gv);
}


Set the data source of the grid views as required.
 
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