As an exercise to help me become more familiar with RadGrid and LINQ as well as master/detail pages, I am building an application which will help me to track a gear list for participants in a backpacking trip. Hikers are required to obtain all of the items on the gear list. I wish to create a page with a list of hikers in one grid and a list of gear items in another. When the user clicks on the name of a hiker in one grid, the other grid will display a full list of gear items, each with a checkbox to indicate whether or not the item has been obtained by the selected hiker. The user can check or uncheck items as needed.
I have created a simple DB which is depicted in the attached image. I have also created a VS2008 web application which includes a DBML for the LINQ to SQL entities. As this is an personal exercise, I have complete control of the DB and application code, so no options are off the table.
My particular question involves presenting the data to the user and recording their input (checking/unchecking gear items.) As you can see from the diagram, I have tables for Person, Gear, and PersonGear. Person contains a master list of hikers, Gear contains a master gear list, and PersonGear is a link table which holds a record for each piece of gear a person has obtained.
How can I most efficiently present the gear records for a hiker and allow the user to check and uncheck boxes in a detail grid? Will I have to bind the gear grid to the Gear table, include a checkbox column, then iterate through the records and set the checkbox value based on the presence or absence of a record in the PersonGear table, or is there a more straightforward approach that I'm missing?
Thanks in advance for your help.
I have created a simple DB which is depicted in the attached image. I have also created a VS2008 web application which includes a DBML for the LINQ to SQL entities. As this is an personal exercise, I have complete control of the DB and application code, so no options are off the table.
My particular question involves presenting the data to the user and recording their input (checking/unchecking gear items.) As you can see from the diagram, I have tables for Person, Gear, and PersonGear. Person contains a master list of hikers, Gear contains a master gear list, and PersonGear is a link table which holds a record for each piece of gear a person has obtained.
How can I most efficiently present the gear records for a hiker and allow the user to check and uncheck boxes in a detail grid? Will I have to bind the gear grid to the Gear table, include a checkbox column, then iterate through the records and set the checkbox value based on the presence or absence of a record in the PersonGear table, or is there a more straightforward approach that I'm missing?
Thanks in advance for your help.