C# or SQL [modified]
-
Hi all, I am trying to create a datagrid to look like this pic below the data is stored in 2 tables the ScoutAssignment table and Match table, my initial plan is to use sql to all the scouts that have assignments for the selected week, build the table outline using this method, fill an in memory datatable with all the matches that have assignments during the week and loop through the original table (of scouts and dates) fillin the cells where the scout has an assignment…… but Im wondering if its possible to fill entire datagrid using sql or if anyone has any better suggestions or advice it would be appreciated Thanks in advance Tim http://img168.imageshack.us/my.php?image=scoutassignmentscx2.jpg[^] -- modified at 6:25 Tuesday 7th August, 2007
-
Hi all, I am trying to create a datagrid to look like this pic below the data is stored in 2 tables the ScoutAssignment table and Match table, my initial plan is to use sql to all the scouts that have assignments for the selected week, build the table outline using this method, fill an in memory datatable with all the matches that have assignments during the week and loop through the original table (of scouts and dates) fillin the cells where the scout has an assignment…… but Im wondering if its possible to fill entire datagrid using sql or if anyone has any better suggestions or advice it would be appreciated Thanks in advance Tim http://img168.imageshack.us/my.php?image=scoutassignmentscx2.jpg[^] -- modified at 6:25 Tuesday 7th August, 2007
This sounds like a job for the GridView control. You can create a stored procedure that joins the two tables. Set the stored procedure as the selectCommand for a SQLDatasource and bind that SqlDatasource to the GridView control.
-
Hi all, I am trying to create a datagrid to look like this pic below the data is stored in 2 tables the ScoutAssignment table and Match table, my initial plan is to use sql to all the scouts that have assignments for the selected week, build the table outline using this method, fill an in memory datatable with all the matches that have assignments during the week and loop through the original table (of scouts and dates) fillin the cells where the scout has an assignment…… but Im wondering if its possible to fill entire datagrid using sql or if anyone has any better suggestions or advice it would be appreciated Thanks in advance Tim http://img168.imageshack.us/my.php?image=scoutassignmentscx2.jpg[^] -- modified at 6:25 Tuesday 7th August, 2007
tadhg88 wrote:
[URL=http://img168.imageshack.us/my.php?image=scoutassignmentscx2.jpg\][IMG]http://img168.imageshack.us/img168/1810/scoutassignmentscx2.th.jpg\[/IMG\]\[/URL\]
Could you do a proper clickety link so people don't have to copy and paste into their browser, like this... http://img168.imageshack.us/my.php?image=scoutassignmentscx2.jpg[^] http://img168.imageshack.us/img168/1810/scoutassignmentscx2.th.jpg[^]
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon