Tracking Forums, Newsgroups, Maling Lists
Home Submit Tracker Forums
  Advanced Search


MVC :: Wrtite A Model For Master - Detail Tables?

i wanna wrtite a model for master - detail tables. using mvc and entity framework.

for example maste table is ORders, detail table is ORderDetails.

ORders colunms (OrderID, Date, Employe..)

OrderID Date ....
1 1/1/10
2 1/2/10

OrderDetail columns (OrderID, porductID, Amount)

ORderID ProductID Amount
1 1 10
1 2 8
1 3 7

i am creating a model for this structure

Puclis class Model{
public OrderID, Date, Employe;
List<OrderDetail> list ; // this is another class OrderDetails...

while saving this model to database orderID,Data,Employe... items are saving Orders table in database. and List<OrderDetail> is saving with for loop to ORderDetail table.

but editing the order and details model is difficult.

View 4 Replies (Posted: Feb 01, 2011 01:15 PM)

Sponsored Links:

Related Forum Messages For ASP.NET category:
DataSource Controls :: Master Detail Using EF Model Where Condition For Detail - 3.5 Sp1?
I've been experimenting with using EF ( 3.5 sp1) with a master detail page. Using northwind as the database, I'm simply trying to have categories as master and products as detail. I have read everything I could find on the net about the where condition and it still fails with this error as soon as I click the select link in the master grid:

Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: A property with name 'CategoryID' does not exist in metadata for entity type 'WebAppEF01.Products'.

What strikes me is that the CategoryID column is not exposed by the EF model. That's been rolled up into the navigation element 'Categories' I suppose...but on the surface this seems to create the problem I've running in to. I've tried turning off the autogeneratewhere clause but didn't have success. The code for this page follows below.


Posted: Jan 26, 2010 04:01 AM

View 2 Replies!   View Related
Crystal Reports :: Master Detail Of All Data In Tables?
I have a current scenario where I have a master detail report for a single certain record in table in format

Record 1
detail 1
detail 2
detail n

Currently I have 2 details section with Record data in 1 section and a subreport in other section (details)

Now I want to have report for all records in table like

Record 1
detail 1
detail 2
detail n
Record 2
detail 1
detail 2
detail n
and so on.

How do I structure my report to have master details for all the records in the table ?

Posted: Mar 16, 2010 10:43 AM

View 10 Replies!   View Related
Access :: Delete Records From Master & Detail Tables?
My requirement is as under:-WhenI press button, a stored procedure shouldcall and delete the records from Master & Detail Tablesusingof parameter from a textbox as ID.

Posted: Sep 26, 2009 12:47 PM

View 2 Replies!   View Related
Forms Data Controls :: Master / Detail Page - Updating Detail Records - Need Access To Master ID (key)
I have an "Edit"page that uses a FormView bound to an EntityDataSource. The page is called with the ID field of the record to edit in the query string: "EditEmployee.aspx?ID=10". The EDS the FormView is bound to is using: AutoGenerateWhereClause=true and a QueryStringParameter. Below the FormView I have a ListView that contains some child records of the FormView.The ListViewis bound to a seperate EDS and also uses the (same) QueryStringParameter.

The problem I am having is when this ListView attempts to Insert or Edt a column I receive an error because I don't have the ID field (EmployeeID) of the parent bound anywhere in the ListView (and obviously, it is setup as a ForeignKey so it fails, like it should). Any advice on the best way to get this ID (EmployeeID)columnbound in the ListView? There are many things I can do in code behind, but I would like to solve this in the markup if possible. I can move the ListView so that it is inside of the FormView if necessary.

Posted: Jul 30, 2010 03:56 PM

View 1 Replies!   View Related
Forms Data Controls :: Master / Detail With Additional Detail Paging
I'm trying to setup is a News module with article listing paging and article detail paging. I have a GridView with paging that lists my articles just fine. In that list, some article titles have links that direct to an article detail page by passing in the articleID to the details page. I was able to setup my details page, which uses a DetailsView control, to use paging by using an ObjectDataSource with pageIndex and pageSize parameters from the querystring. Once on my detail page, I can use my navigation arrows to move through Next and Previous articles just fine.

No matter which article I click in my article list, my detail page always starts with pageIndex 0 and thus not the article I clicked on. I understand why that is because it's going by pageIndex value instead of articleID. What I need it to do is, set the detail to whatever articleID i pass in, then allow me to navigate Next and Previous to THAT particular article instead of starting me off from pageIndex 0.


Posted: Aug 06, 2010 01:48 PM

View 2 Replies!   View Related
MVC :: 3 Master / Detail View Inserts New Detail Records Instead Of Updating Existing
article on binding to a list and I've got that working fine on one view. But what I'm stuck when doing it off a master record. Everything seems to work except that when I look in the database the detail records previous associated with the current master have their Foriegn key to master set to Null and a new set of detail records have been inserted. I've got a really simple form for this object


The form collection comes back with the expected prefixes:


And the Controller.UpdateModel(master) binds all the properties correctly. But when I call dbContext.SaveChanges it issues the follow sql from sql profiler (psuedo code)


I've got a work around that works but it's pretty hackish and I'm currently not matching up the keys so it's dependent on everything coming back in the right order. Plus I've got to include all the fields that I want updated.


I thought that entity framework's code first was the culprite but I've unit test that and it works fine. I've got a feeling that UpdateModel is somehow removing and re-adding the children. Has anyone else got this to work? Of course, I could throw in the towel and parse the indexed field names myself, but I'm so close!

Posted: Feb 06, 2011 09:14 PM

View 2 Replies!   View Related
AJAX :: Master - Detail Page Reloading The Detail Page With Update Panel
I have a Page with a FileUpload control on the top with the "Insert" button, in order to insert pictures Below that, i have a Listview showing all the pics. THis is the way i am placing my Update Panel:


How can i, press the INSERT button and reloads only the Content Template after INSERTING?

Posted: Jul 27, 2010 11:52 AM

View 3 Replies!   View Related
C# - MVC Routing For Master / Detail Views With "Detail Children"
I have the basic Master / Detail Views working great with the default ASP.NET MVC Route; however I would like to build some URLs like this: /Class/Details/5 -- General Detail view [Working] What I'm not sure about (and I'm not tied to this URL format, just something roughly equalivent.)

/Class/5/Details/Logs -- Detail View with Logs
/Class/5/Details/Status -- Detail View with current Status

Another way to put this, is like this: /{controller}/{id}/{controllerSpecificMaster}/{action}/ What I'm trying to avoid, is cluttering up my ViewsClass directory with a bunch of Views, which are all basically derivatives of the Details view. I'm on ASP.NET MVC 1 and .NET 3.5 SP1.

Posted: Jul 27 10 at 20:00

View 1 Replies!   View Related
SQL Reporting :: Group Two Detail Tables In A Report With Groups?
I have a table with a field "item id" that I am joining to two other tables that have multiple records for each item id. In other words, I have 1 item id, 5 records in another table tied to this item and 5 records in another table tied to this item. I am trying to build a report that shows the item and then follow the item with two groupings. Each group would of course have the 5 records per the other two tables. Here is my problem. I can get the report to show an item and one of the detail group of 5 records but for the life of me I cannot get the secondgroup of 5 to group and print. Both groups of 5 get either lumped together or it will print them 1 record at a time switching back and forth. How do you do this? Do I have to do something special in the Sql query or something.

Posted: Jul 03, 2010 02:55 AM

View 1 Replies!   View Related
MVC :: Master Detail (in The Same View)?
Master Detail (in the same view)

Posted: Aug 10, 2010 09:38 AM

View 3 Replies!   View Related
How To Link Datas In Master Detail
I have a drop down list where i populate with titles from an rss feed.


my problem is how to link in a "master detail" way the Title to Discription? So that when a user select a title it show related discription in a label.

Posted: Jun 12, 2009 09:57 AM

View 2 Replies!   View Related
C# - Master Detail Objects Work In OOP ?
I am currently designing a master detail gridview. I have two separate objects defined for them. The parent gridview is binded to the first object and in row databind event I bind the second gridview with the detail object using parent ID.A lot of examples I see on the internet initialize the details object inside the parent class,

public class Author
private string name;[code]...

What is the purpose of initializing child class inside the parent class? Currently, I just bind the parent to a separate object & child to a separate object manually in my presentation layer & never initialize child objects inside parent class. Is that the wrong way for OOP ? What is the recommended way to achieve this task for my gridview?

Posted: Mar 29 at 5:15

View 3 Replies!   View Related
VS 2008 Build Master Detail Functionality
I am trying to build a master detail functionality. It present, there is a web page i.e. page1.aspx with search functionality. When the criteria is entered then the search button can be clicked and then the GridView gets populated with data. In this GridView, a number of the fields of the selected row can be edited as per business requirement. Now I would like the user to be able to see and edit more fields related to the selected row in the gridview. These are extra fields which are not viewable in the gridview. Question: Is it best to have another page i.e. page2.aspx to see and edit these extra fields or is it better to have these extra fields (One in each control) just below the gridview in page1.aspx?

Posted: Jan 28th, 2010, 02:42 AM

View 8 Replies!   View Related
Web Forms :: Master-Detail From A DropDown List?
I have amaster - detailquery that I'm trying to run and I've runinto a road block...I have atable with 'County' as one of the fields. I'd liketo display the county name in the drop down list, and then display the details of that record in a 'details view/grid' below the drop down list. Here is what I have sofar:


I'm getting the error: Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS1061: 'ASP.default_aspx' does not contain a definition for 'DropDownList1_SelectedIndexChanged' and no extension ethod 'DropDownList1_SelectedIndexChanged' accepting a first argument of type 'ASP.default_aspx' could be found (are you missing a using directive or an assembly reference?)Source Error:


Posted: Aug 03, 2010 03:22 PM

View 4 Replies!   View Related
Web Forms :: Master/Detail Filtering With A DropDownList?
I was looking tutorial for Master/Detail and I have one question. If I populate DropDowList with some data from database and run application, DropDownList show the first record from database. And if I choose some Item from DropDownList DataList show result of filtering. How when I run application to populate DataList as Detail using parametar of first Item in DropDownList populated from database?

Posted: May 29, 2010 08:13 AM

View 5 Replies!   View Related
AJAX :: Popup Panel To Master - Detail Not Working
I 'm writing a gridview. When you click a image button in the gridview, it will popup a panel to show detail. But it isnot working at the moment.

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="test67.aspx.vb" Inherits="test67" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<head runat="server">
<link href="css/style_ie.css" rel="stylesheet" type="text/css" />
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%&#36; ConnectionStrings:NorthwindConnectionString %>"
SelectCommand="SELECT CustomerID, CompanyName, ContactName, ContactTitle, Address, City, Region, PostalCode, Country, Phone, Fax FROM Customers">
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
DataKeyNames="CustomerID" DataSourceID="SqlDataSource1">
<asp:BoundField DataField="CompanyName" HeaderText="CompanyName"
SortExpression="CompanyName" />
<asp:BoundField DataField="ContactName" HeaderText="ContactName"
SortExpression="ContactName" />
<asp:TemplateField ShowHeader="False">
<asp:ImageButton ID="ImageButton1" runat="server" CausesValidation="False" CommandName="Select"
ImageUrl="Images/details_icon.gif" ToolTip="Show Details"/>
<asp:Panel ID="Panel1" runat="server" BackColor="#FFFFFF">
<asp:UpdatePanel ID="UpdatePanel2" runat="server" >
<asp:SqlDataSource ID="SqlDataSource2" runat="server" SelectCommand="SELECT customerid,CompanyName, ContactName, ContactTitle, Address from Customers WHERE CustomerID = @CustomerID"
ConnectionString="<%&#36; ConnectionStrings:NorthwindConnectionString %>" UpdateCommand="UPDATE customers SET CompanyName=@CompanyName ,ContactName=@ContactName ,ContactTitle=@ContactTitle ,Address=@Address where CustomerID=@CustomerID">
<asp:ControlParameter ControlID="GridView1" Name="CustomerID" PropertyName="SelectedValue"
Type="String" />
<asp:Parameter Name="CompanyName" Type="String" />
<asp:Parameter Name="ContactName" Type="String" />
<asp:Parameter Name="ContactTitle" Type="String" />
<asp:Parameter Name="Address" Type="String" />
<asp:Parameter Name="CustomerID" Type="String" />
<asp:DetailsView ID="DetailsView1" runat="server" DataKeyNames="CustomerID" ForeColor="#000000"
DataSourceID="SqlDataSource2" HeaderText="Details" AutoGenerateEditButton="True"
AutoGenerateRows="False" BorderColor="Gray"
BorderStyle="Solid" BorderWidth="1px">
<FooterStyle CssClass="orderhistorydetail2_table_head0" ForeColor="White" Font-Bold="True"></FooterStyle>
<CommandRowStyle BackColor="#dfe4ec" ForeColor="#003975" HorizontalAlign="Left" Font-Bold="True"></CommandRowStyle>
<EditRowStyle BorderStyle="None"></EditRowStyle>
<RowStyle BackColor="#FFFFFF"></RowStyle>
<PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center"></PagerStyle>
<asp:BoundField DataField="CompanyName" HeaderText="CompanyName" SortExpression="CompanyName" />
<asp:BoundField DataField="ContactName" HeaderText="ContactName" SortExpression="ContactName" />
<asp:BoundField DataField="ContactTitle" HeaderText="ContactTitle" SortExpression="ContactTitle" />
<asp:BoundField DataField="Address" HeaderText="Address" SortExpression="Address" />
<RowStyle Font-Names="Verdana" Font-Size="10px" ForeColor="#000000" Height="25px" />
<HeaderStyle CssClass="orderhistorydetail2_table_head0" ForeColor="#003975" Height="25px" />
<AlternatingRowStyle BackColor="#EEF1F5" />
<cc1:PopupControlExtender ID="PopupControlExtender1" runat="server" TargetControlID="ImageButton1"

Posted: May 12, 2010 05:47 AM

View 3 Replies!   View Related
Web Forms :: Build Treeview From Master Detail Table?
I am building treeview using 2.0/3.5 from master detail table.

ParentTable Value ---ChildTable Value ---GrandChildTable1 Node ---GrandChildTable1 Value ---GrandChildTable2 Node ---GrandChildTable1 Value

I have created something like this to populate node values. But I am not sure how to display GrandChildNode and values.


Posted: Jan 20, 2010 12:29 PM

View 1 Replies!   View Related
Designing Master/detail Forms On A Single Page?
I have a single web page with master detail form/input layout. Currently the form works in a way like

User opens the page containing both master/detail data entry controls and enters the master information (The details save button is disabled)When he saves the master information, the save master button gets disabled and save details is enabled User continues to enter multiple details which get populated in a gridview at the bottom of page All works well Problem is that, the master part contains a lot of data entry controls (drop down lists gridviews etc)

How do I facilitate the user much more then the current layout? Should he be redirected to a new page after he enters the master record ? How can I improve on this?

Posted: Sep 22 10 at 5:07

View 2 Replies!   View Related
VS 2005 - Perform An Insert Command In A Master Detail Transaction?
I find my own way redundant to perform an insert command in a master-detail transaction. Sample, is a Purchase Order, before inserting the details/items will need to find the master key otherwise were not able to make the details connection. Normally we send command to button object which will submit the whole page rather than part of it and these means were not able to capture beforehand the master key to refer in the details.

So, Im thinking of how you do efficiently a master/detail batch update like we normally do in windows apps.

Posted: Jul 15th, 2010, 07:24 AM

View 2 Replies!   View Related
Change Data Of Master Detail DropDowns Without Page Reload
I have two dropdowns in my web form which have master detail relationship. Ex : DropDown 1 = Countries DropDown 2 = States if i change the country in first dropdown the states in second dropdown shuld change. I am using server side controls for dropdowns. Is there any way to do this without Page reload.

Posted: Aug 05, 2003 05:40 AM

View 2 Replies!   View Related
Forms Data Controls :: GridView And DetailsView Master To Detail
I am using a GridView and a DetailsView to establish a master to detail form, the idea is to let user select a record on Gridview and Detailsview will load selected record for editing. Here is declaration for the ODS and Detailsview.


this is working fine when I select a record from GridView and edit/update it in DetailsView. But it's not working so well when I insert a new record using DetailsView, because after insertion the selected record remains as the record selected in GridView.

Posted: Apr 07, 2010 08:51 PM

View 4 Replies!   View Related
Forms Data Controls :: How To Create Hierarchical-master / Detail UI
So here is the situation - there is data on master records - its a hierarhical view - something like (ID, IDParent, Title) and detail data - (ID, IDMaster, Details)

And like to build UI using an TreeView - binded with master data - and an GridView - binded with detail data.

Question is witch property to use to create the master/detail chain between Datasources - oh, I've forgot to tell I'm using an ObjectDataSource?

Posted: Aug 11, 2010 09:31 AM

View 3 Replies!   View Related
Web Forms :: Breadcrumb - Master / Detail Page Not Showing Correctly
I have run into a little problem that I can not work out how to resolve. I am trying to create a breadcrumb for my web site and it is working sort of but when Iget to a master/detail page it is not being shown correctly. In my Products I would like the breadcrumb to show Products > Product Range > WidgetA Range > WidgetA.1 What I am getting isProducts > Product Range > Product Page > WidgetA Range > WidgetA.1 WidgetA Range & WidgetA.1 will come from a database. I can not work out how to stop it saying Product Page.


The above code is what I am using it is called from page load.


and this will be from the web.sitemap.

Posted: Dec 20, 2009 09:52 AM

View 5 Replies!   View Related
Any Starter Project On Simple Master Detail Through Objects / Classes?
I just want to start coding a simple master detail form but through with loosely typed datasets/objects and also layer or tier architecture. Is there any starter project for this kind of code? Most of the help I find on google discusses strongly typed data objects or very advanced designs.

Posted: Apr 29, 2010 03:52 PM

View 5 Replies!   View Related
Forms Data Controls :: Master-Detail Mechanism Not Working?
I have a wizard control step 3 has a grid view which has a checkbox column and a button below which records the last row index which is checked ( see the code for ShowWineDetailsbutton_Click)

I am storing the id in a textbox on step 3 and using this as a control parameter for the select statement connected to the details view on the next wizard step.

The parameter ProducerWinePk is taken from the textbox(


Only the details page that was produced first is seen irrespective of which checkbox is checked.

for eg, if I check 3rd row and see the details and come back and check 4th row, i still see the details for 3rd row.

Posted: Oct 09, 2009 04:19 AM

View 3 Replies!   View Related
Forms Data Controls :: Creating Master/detail Pages?
I have a gridview that displays some records....i have added a new column to it called when i click the edit link it should take me to a new page where i can edit that particular record do i go about it? I am using forms and no inbuilt ASP.NET controls except i need to write queries for the same.....plz post code if possible

Posted: Mar 14, 2010 05:38 PM

View 14 Replies!   View Related
AJAX :: Hover Extender Show Associated Record Master Detail
I have a simple page containing gridview1 with hover extender for gridview2 and this works fine.

my aim is to view only the associated detail for the record that is being hovered over.

My data source supplies both gridviews and contains two tables.

Table1 leadid & lead

Table2 Noteid, leadid & Note

how to add evaluation of Leadid to display (evaluate) the associated Note record in table2 (the tables are joined in 1 to many relationship).

My code is as follows:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Hover.aspx.cs" Inherits="Hover" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">


Posted: Dec 16, 2009 08:21 AM

View 5 Replies!   View Related
Forms Data Controls :: 'Click Twice' With Master/detail Gridviews?
I have a master gridview, and another one that displays some details. It is set up as recommended - the datasource for the details gridview uses the selected index of the master as a parameter. I also have a detailview which is set up in the same way, from the same master gridview.When selecting a row in the master grid (it has a select button column) the detailview changes to display details for the selected record fine, but the other gridview does not update until the select button is clicked again.Does anyone know how to solve this? I've been Googling it for days, and tried all kinds of things, like re-binding and resetting indexes in various events etc. I assume it's something to do with how the gridview works that is different to the detailview.EDIT: I've noticed that when changing pages on the master gridview it refreshes the data in the details gridview fine (as the selected row changes everytime the page is changed). I assume this is due to the page being reloaded though.

Posted: Feb 28, 2008 02:26 PM

View 14 Replies!   View Related
AJAX :: ModalPopupExtender Editing Rows In DetailsView (Master/Detail)?
I am at a stand still here. I have a GridView in which I'm moving theDetailsView (bound to a sqldatasource)to the ModalPopupExtender for Updating. DetailsView for the selected row is contained in an updatepanel with the UpdateMode set to Conditional. My Select function works properly, filling in the fields of DetailsView, but I cannot figure out how to get the Update function to work properly. I think what I am missing is a method to get the the key values and control values into the SqlDataSourceUpdateParameters.





Posted: Jan 23, 2010 10:18 PM

View 2 Replies!   View Related
Northwind (SSMA) - Create A Query In SSMS And Then Set Up Master - Detail Views
I'm trying this example: [URL] I got it to work before, like 6-months ago. I'm coming back to this now and I can't seem to get the example working. Do I need to create a query in SSMS and then set up my Master/Detail views off of that? It seems like the GridView is NOT linked to the DropDownList and it seems like there is no way to link the two Objects.

Posted: Aug 31, 2010 12:21 PM

View 2 Replies!   View Related
AJAX :: Master Detail - Modal Popup Duplicate Component ID Error
This is my main page in which I have collapsible panel and my phone gridview is contained in it. The Initial page loads up properly and shows the gridview. All the errors happen when I select a gridview row for modal popup edit. I get the following errors one after other after ignoring each one of them. I have been struggling with his for almost a week. Following are the sections ofthe main page and thecode in thegridview ascx control. Main GridView User Control Page.


Posted: Sep 10, 2010 04:24 AM

View 1 Replies!   View Related
Web Forms :: How To Create An Master / Detail Form To Insert Data Into A DataBase
I need to create a Master Detail detail form to insert data into Access. The form i have to create is very similar to the typical Order/Detail form.

Posted: Apr 22, 2010 03:08 PM

View 3 Replies!   View Related
DataSource Controls :: Insert Master Detail From Text File With LINQ
I'm new onto LINQ andim working on a application which uploads a requisition from a preformated text file that is coming from another application.

Th format of the file its like:

HDR 001000 Description

DTL PartNumber CatalogNumber ItemDescription RequestedQty RequiredDate

DTL PartNumber CatalogNumber ItemDescription RequestedQty RequiredDate

DTL PartNumber CatalogNumber ItemDescription RequestedQty RequiredDate

I want to insert information gathered from the text file readed using streamreader with master/detailusing LINQ datacontext into the database.

Heres the code of a test page to loop through the file:


Posted: Mar 02, 2010 06:32 PM

View 5 Replies!   View Related
Forms Data Controls :: Datalist And A Listview In A Master/Detail Relationship?
I am using a Datalist and a Listview in a Master/Detail relationship. Each time a DataList item is bound, a Listview is loaded dynamically. I have provided the relevant Layout and Item templates. It is worked fine for one item. But for more than one item, it will raise the following error: "An item placeholder must be specified on ListView 'ItemListView'. Specify an item placeholder by setting a control's ID property to "MyLayout$itemPlaceholder". The item placeholder control must also specify runat="server".
Despite having set up the item placeholder.

Here is the code-behind:

protected void NodeDataList_ItemDataBound(object sender, DataListItemEventArgs e)


if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)[code].....

The Layout template:<asp:PlaceHolder ID="itemPlaceholder" runat="server"></asp:PlaceHolder>

Posted: Jul 02, 2010 07:59 AM

View 3 Replies!   View Related
Forms Data Controls :: Listview Master Detail On Separate Pages?
I made my own master-detail pages using a listview. Rather than url, I use a listview event to set a session variable and response.redirect to the detail page, which on Page Load, loads the data from the database using the session variable, where it can then be edited. The details page is basically just text boxes and dropdownlists, but I used some third party controls and it all looks really sharp.

Here is the corner I pained myself into. Several dependent dropdowns on the master page filter the main listview. If I go back to the master page using response.redirect, the user would have to use the dropdowns again just to get back to where they were before they went to the details page. This is just not going to work.

To further complicate things, I wanted the master page to have paging on it. So if a back button reloads the page, they would have to set the dropdowns again, and page through the data again if needed. Egads.

The closest I have come to working is using a javascript back back button, but this fails after some postbacks on the details page (that are needed). And of course, the master page isn't refreshed when you go back to it (but I could probably live with that).

Posted: Nov 14, 2010 09:49 PM

View 5 Replies!   View Related
MVC :: Master-Detail-UserLink: Strongly Typed View And Custom Nested ViewModel?
When I send a strongly typed ViewModel containing other ViewModels nested inside (basically spanning 3 tables into one object) all the data is correctly presented when debugging. However it complains at rendering time with an exception "Compiler Error Message: CS1061: 'object' does not contain a definition for 'Name' and no extension method 'Name' accepting a first argument of type 'object' could be found (are you missing a using directive or an assembly reference?)"

and the error is thrown from mvc2-rtm-sourcessrcSystemWebMvcMvcViewPageControlBuilder.cs method:
ProcessGeneratedCode line 19

PageBaseType is null all the time





3 tables make up for the ProjectModelView object


Posted: Jun 13, 2010 08:02 PM

View 5 Replies!   View Related
AJAX :: Update Master / Detail GridView - DetailsView With Modal PopUp Extender
My Master/Detail view is working fine, but if i try to add Modal PopUp extender it does not work at all.


adding Modal Popup to this code. I have studied [URL] article many times but could not find problem with my code. My code should display Modal PopUp 2 times. Once New Client btn is clicked & other time when edit inside GridView is clicked.

Posted: Jun 12, 2010 05:51 PM

View 2 Replies!   View Related
Forms Data Controls :: Master - Detail View - Get ONLY One Item From The LinqDataSource On The Page
Im making a Master details web page ASP.NET. I have one aspx page with all the items in a listview, then a link to another page to show the details view, but I dont want to use a asp:detailsview control becasue it generates a table, and I want a more complex layout. I want work each property of the item, but I dont know how. I want to do in LINQ. This is my very bad aprox: I need an orientation of how to get ONLY one item from the LinqDataSource on the page load and not to query the database everytime I need a column. I dont need biding because I only need to show data, not insert, not update, not delete...

Posted: Feb 22, 2010 06:26 PM

View 2 Replies!   View Related
Forms Data Controls :: Use Manual Insert & Update With FormView (master/detail)
I havea master/detail page usinggridView andformView attached to a pair of entityDataSources. The automagic insert and updates quit working after making heavy customizations to the form (replacing ID numbers with persons' name, etc). The automatic CRUD throws errors on insert and silently fails on edits, but delete works fine (woot!!!).

After two fruitless months of trying to get the automatic insert and update to work, I wrote my own code to replace them. This has caused a new problem: The records are inserting correctly (haven't made it to the updates yet) but the automatic is still firing and throwing an error. I've tried turning the automatic inserts and updates off - the insert still fires, but an exception is thrown that the form doesn't support inserting records.

I can post code but I don't know whats relevant. The two files are in the neighborhood of 220 lines each.

Basic structure is


formview tied to gridview

formview fires OnDataBound (code replaces numbers with human readable stuff) formview fires OnItemInserting (fires custom code to assemble new record and save to the database outside the entityDataSource) formview fires OnItemUpdating (when completed, will update records similar to OnItemInserting) entityDatasource for gridview

autogenerate where clause turned on Enable Insert, Delete & Update turned on entityDatSource for formview

Posted: Oct 21, 2009 03:50 PM

View 5 Replies!   View Related
Copyright 2005-08, All rights reserved