Click here to Skip to main content
15,938,218 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a requirement to display data from the lookup tables in SQL database on to a gridview in I have around 17 lookup tables in the db. Structure of the tables are same, just that, the column names are different for each lookup table.
As of now, i am creating and binding the grid dynamically. The edit, update , delete functionalities are also implemented in code behind.
Just wanted to know, if dynamic grid is a good design for the above situation or should i bind 17 different static gridviews to the lookup tables.
Which one would be a better design in terms of performance.?

Any help appreciated...thanks..


Hi Gaurav,

Always a dynamic grid takes time to load the data as it has to create the grid itself in the run-time. So, a static grid would be better in terms of performance levels.

As you have mentioned there are 17 lookup tables in your DB with same schema but with different column names, I would suggest you to use a single static grid.

My suggestion is to get the lookup table names into a Dropdownlist. On selecting the required lookup table, you can maintain a single static grid with CURD functionality.

Loading 17 different static/dynamic grids in a single page is also not a good idea.!

The logic here is you get the required lookup table with 'ID' as first column and 'Description' as second column. Even if the column names are different, just use the alias name in the DB to get the data.

Thank you,
Share this answer
thanks a lot Vamsi...that is exactly what i am doing.
I have one grid defined in my aspx page and i am binding it on runtime on the basis of a look up id.
I am looping over all the column names in the dataset and creating a bound field for the static grid, in the code behind.

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