Click here to Skip to main content
15,917,473 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

Suppose there is 20 table in sql server 2005, with different column name, number of column etc. Now I want to bind my gridview dynamically,
to the table. How can I do this? I want that my gridview should have same no. of column, same name etc. of the table in sql server. Also it should have functionally such as edit, sort etc. It should have itemtemplate, edititemtemplate etc.

The user will have a textbox where he will write the select query. How can I do this? Should I have create a dynamic gridview, then count the number of column and also read the header text of the sql server table? How can I do this? How can I create dynamically itemtemplate, edititemtemplate?

Please help.
Posted
Updated 19-Nov-10 7:43am
v2
Comments
fjdiewornncalwe 19-Nov-10 14:32pm    
What version of dotNet are you using? Is this C# or VB.NET? In order to describe how to go about data binding for this type of problem, we'll need to know this as there are different approaches between dotNet versions.
software_Engi08 22-Nov-10 10:48am    
I am using visual studio 2005 and language c# ,want asp.net code

1 solution

Hi,
Have a look Here[^]
 
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