Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 filling sql datatable from grid view

Author  Topic 

dhanya
Starting Member

1 Post

Posted - 2011-07-12 : 10:47:53
I have my output in grid view in the following format.


| outlook |
< overcast >
| yes |
< rainy >
| wind |
< strong >
| no |
< weak >
| yes |
< sunny >
| humidity |
< high >
| no |
< normal >
| yes |


yes and no are my class values which is the answer.i want this grid view to populate a sql data table like the following.

those within | | can come under parent and child column of data table based on conditions.those within < > are branches.yes and no come under class column only.
the attribute outlook has 3 values-overcast,rainy and sunny
wind has 2 values-strong and weak
humidity has 2 values-high and normal


id ---- parent-------branch------child-----class
1 ----outlook-------overcast---- ----yes
2------outlook-------rainy-------wind
3-------outlook-------sunny------humidity
4-------wind----------strong------ ----no
5-------wind-----------weak------- ------yes
6-------humidity-------high------ ------no
7--------humidity-------normal--- -------yes


please give me suggestions of how to do it
   

- Advertisement -