locked
Master-Detail with Mobile Web Forms RRS feed

  • Question

  • User-204634223 posted
    Can someone please advise on the best approach to the following programming problem? I am using an ObjectList Control to browse rows from a master table. The details table contains URL and caption information for zero, one or many associated photographs. I want to introduce the option of being able to display, one-by-one, each of the photographs associated with the current record displayed in the ObjectList. I would prefer not to display all photographs on the same form, because there could be a lot and this could lead to long download times to the Pocket PC. I have taken advantage of the ObjectList control's Commands property to create a custom command that will allow me to display the photograph form. However I am unsure as to what is the best approach to take from here. Do I do something with query strings and Next/Previous buttons, do I use another ObjectList for the details table (bearing in mind that, apart from the caption, I do not want to display information from the details table - only use it to locate the photographs on the server), or do I do something else? I only have a single aspx page at present with 5 forms. Do I need to introduce a new form? Any ideas or suggestions on the best way forward would be much appreciated.
    Friday, February 18, 2005 8:40 AM

All replies

  • User1625204979 posted
    Yes, i think you can use another ObjectList for the details table in a different form to display a selection of links to individual pictures. In your objectlist command handler of the master table, set some variables that identify the selected record, then bind the necessary data to the other objectlist for details table, and switch to the form that contains the second objectlist.
    Friday, February 18, 2005 8:27 PM
  • User-204634223 posted
    That sounds good and I could the use imageCaption field for the LabelField property to act as a meaningful link to the photographs. However, I'm not sure what to do when it comes to specifying the Fields property for the new ObjectList since I don't actually want to display any fields from the data source in the table view, only use the imageURL field associated with the selected imageCaption to locate the photograph on the server and display it somehow.
    Wednesday, February 23, 2005 9:12 AM
  • User-204634223 posted
    I think that I was in danger over-complicating the solution to this with my lack of experience. Anyway I thought that I'd document my solution for the benefit of others. Rather than have a second objectList control for the detail table, I created a new form containing an image control and a drop-down selection list which I populated with the captions from the detail table. When the user selects a caption from the drop-down the application uses the associated url field to set the imageURL property of the image control.
    Thursday, March 3, 2005 10:30 AM