Forum Moderators: buckworks
I have a gridview. I need to display data in gridview in tabular format.
It goes something like this:
¦Game1¦Game2¦.....
Tech1¦ 5 ¦ 10 ¦.....
Tech2¦ 45 ¦ 77 ¦.....
.........
......
Games can be anything from 1 to n
Also Tech can be anything from 1 to n.
games & tech will be dependent on the user when they enter it in the db.
Also 5, 10 are the numbers that are referenced like this:
Game1, Tech1 - 5
Game2, Tech1 - 10
Game1,Tech2 - 45.......
So I am not understanding what shud be best used for this purpose.
Please throw some light and help me out.
Thanks for you time.
I want the data to be displayed in tabular format.
But my problem is neither my rows, columns are fixed. Basically i need to display data in such a way that there is an intersection of the data is correct.
For e.g:
Tech1
¦
¦
Game1-- 5 .....
.
.
.
.
.
How shud i display all the values properly. The tech1 and game1 shud intersect to give 5.
When tech2 and game1 comes it shud give 45
Tech1 Tech2....
¦ ¦
¦ ¦
Game1-- 5 45......
.........
.........
How shud i store data so that each value comes correct with the corresponding tech and game names.
Let me know if you still dont get it.
I went thrugh controls like gridview but they can display all the data vertically.
but that's what I'm trying to show you. Maybe the -- were throwing you. I used them for spacing.
Let's use words instead.
What I think you're asking for:
Rows for each game. purpose: holds the name of the game and intersects with columns for techs.
Column for each Tech. purpose: holds the name of each tech and intersects with the rows for each game.
At the intersection: Where the game row and the tech column intersect will be the score the tech had for that game.
Yes?
And you refer to Gridview like it was a program or special format. What do you mean by this? To me grids are essentially tables.
But my issue is i dont know how many games or techs will be entered by the user. So how shud i display the data.
If i make a column named games. Then i can store all the names of the games in it. But if i use gridview and bind it to the games column then I will get all the columns in 1 column. But what i want is all the games names in games column to come as a header for each column.
One option is to set the column headers programmatically.
But then how shud i add the intersection values?
Because if i write the query for each intersection then it will be too long.
Hoper this might help u in better understanding.
If you want the data to be confined within a 980px screen width, then you'll need to define the limits. I'd personally allow the user to choose from sets of data. For instance, display the first ten columns (1-10) and then have pagination links for 11-20, 21-30, and so on. THis way you can control how much is displayed yet give the user the ability to see more.
I got the solution.
Just for ur info:
I will pull the data and insert into datatable.
Then, that data will be inserted into another datatable but horizontally into just first row.
Till here, I will get table structure (column names and rows) created.
On similar grounds, all the other data will be fed into another (temp kind of)datatable and will be inserted horizontally into the main datatable.
Hope this will get you some clearity.
Sorry, if I had confused u.
Best regards,
Cheerzzzzz