Processing Master/Detail Using Datagrid in Web Form

B

Bruce LeMond

I'm working on a web form and I have a list box of rooms
in the building and a datagrid containing the items within
the rooms. I'm wanting to program it so the datagrid will
display only those items within whatever room is selected
from the list box. In window forms, I could get this to
work ok by putting in the datagrid member name property
the relationship name HousekeepingRoomsHousekeepingItems,
but when I do this in the web form and start the browse,
it will give me an error page. You will find the info
from the error page below. I have the
HousekeepingRoomsHousekeepingItems defined as the
relationship name in DSHousekeeping.xsd. What will I need
to do to get this to work in web form?

Thanks in advance for your help.

Description: An unhandled exception occurred during the
execution of the current web request. Please review the
stack trace for more information about the error and where
it originated in the code.

Exception Details: System.Web.HttpException: The
IListSource does not contain a data source
named 'housekeepingRoomsHousekeepingItems'.

Source Error:


Line 266: If Not IsPostBack Then
Line 267: RoomListBox.DataBind()
Line 268: DataGrid1.DataBind()
Line 269: End If
Line 270:


Source File: F:\housekeeping\Housekeeping.aspx.vb Line:
268

Stack Trace:


[HttpException (0x80004005): The IListSource does not
contain a data source
named 'housekeepingRoomsHousekeepingItems'.]
System.Web.UI.DataSourceHelper.GetResolvedDataSource
(Object dataSource, String dataMember) +325

System.Web.UI.WebControls.DataGrid.CreateControlHierarchy
(Boolean useDataSource) +472
System.Web.UI.WebControls.BaseDataList.OnDataBinding
(EventArgs e) +48
System.Web.UI.WebControls.BaseDataList.DataBind() +23
housekeeping.WebForm1.Page_Load(Object sender,
EventArgs e) in F:\housekeeping\Housekeeping.aspx.vb:268
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +29
System.Web.UI.Page.ProcessRequestMain() +724
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,586
Members
45,088
Latest member
JeremyMedl

Latest Threads

Top