Click here to Skip to main content
15,884,078 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
            Status_1	Status_2	Status_3	Status_4	Status_5	Status_6
Status_1								
Status_2							
Status_3						
Status_4									
Status_5						
Status_6									


i want to create a dynamic datagrid as above. All status are in table in my database.
Status value will be my column in datagrid and first column of the grid as above.
Checkbox will appear on each cell of grid where user can check/uncheck value
and save in database.

can anyone help me how to design my datagrid. Thanks in advance.
Posted
Updated 4-Apr-13 19:45pm
v3
Comments
Maciej Los 4-Apr-13 8:20am    
What have you done till now?
Chinmaya C 5-Apr-13 4:05am    
As per my understanding, you need to create DataSource dynamically based on your requirement and bind that to the grid.
V. 5-Apr-13 4:10am    
What did you do? If you're stuck with a big problem, try breaking it down into smaller problems:
1: Can you build a grid from code? Create a prototype solution and start with hardcoded values, then strip as much as you can to dynamic values
2: Can you read data from a database? Can you write to it? Create a prototype solution and start with selecting, updating and deleting values.
3: before jumping to merging 1 and 2. THINK. What does it need to do and what will it need to do next year, the year after that? What data needs to be in the database, what types and how will I structure it ? From the database design start coding the access to it (step 2). Once you have the data, create a "grid builder" that handles the translation from objects to a grid (step 1). Then go backward again: grid to object to database.

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