Main/Details Datagrids with Datasets

Results 1 to 2 of 2

Thread: Main/Details Datagrids with Datasets

  1. #1
    Join Date
    Dec 1969

    Default Main/Details Datagrids with Datasets

    Are there any good samples or editorials on creating a main/details page with DataGrids and DataSets?<BR><BR>Scott Mitchell&#039;s DataGrid articles have been very helpful. However he doesn&#039;t use a DataSet in any of his examples. I am trying to create a Master/Details page using a DataSet as the source and am coming across a couple of problems.<BR><BR>1. I click the details button and it brings up the details datagrid just fine, but when I click the edit button in the details grid the details grid dissappears. Then when I click the details button in the main grid again it shows the details grid in edit mode. I am missing something.<BR><BR>2. When I hit the update button in the details datagrid to update the database I get an error "Update unable to find table mapping or Datatable. Now this may have something to do with where I have my daAdapter created--Page Load if no PostBack.<BR><BR>3. When I try to add a table to the dataset for a dropdownlist in edit mode I get an error "The IList does not contain a data source named &#039;States&#039;" even though in my edit event handler I use the fill method of the DataAdapter on the DataSet giving it the name "States".<BR><BR>Any help would be greatly appreciated.<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Main/Details Datagrids with Datasets

    it is hard to address your specific errors when you are giving a global summary and also asking for global-level advice. but i see that you have a lot of code and it is better to ask top-level stuff first.<BR><BR>at the high level, i solve the master/detail issue with datagrids by using template columns in the master datagrid and having one of the columns link to a separate page which contains the detail info. perhaps your solution og bundling it all into one massive grid with sub-grids is a good one, but i personally like to keep things modular so that each element is manageable. if you know the basics of datagrids, and it sounds like you do, then it should be easy for you to use template columns and split your master/detail grids into 2 separate aspx pages with a parameter passed between them. this should make your other errors a lot easier for you to debug.<BR><BR>does this help? if so, i would appreciate some help on my own open problem, which you can read at:<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts