473,582 Members | 3,083 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Firing 1 user control used for 3 different windows at page load with different data

2 New Member
Hi Every one,

Iam Divya working as developer. I had some issues. In my 2 years this is the first forum i saw which is very active in posting the answers. I hope you could solve this also.

Here is my app description:
We are following Model -View -View Model Pattern for WPF Window Project. I have an Window (contains only an XamData Grid) Which is complete User control.
This User Control is used in 3 windows(Male Window, Female, Child) Under 3 tabs.

These 3 windows displays different window data in the grid on Page Load . the type of data(male data, female data, Child data) in grid depends on below navigation path .

Children Window--------------->>child ID,stage ID (parameters)------>> Child tab open----->> diplay Child data

Gents Window -------------->> case ID, male ID( parameters)---------->>Male tab open----->> display Male data

Ladies Window----------------->>pass id, birth id, job id(parametsr)---------->>Female tab open ----->> display Female data.


I have one View -- that is Usercontrol with Xam data grid ( having 12 columns). All the 3 windows have the same columns but different data is displayed in page load ( depends on different navigation which passes diiferent parameters for each window to display.

I have only one view model--

#Region "Constructo rs"
Public Sub New(ByVal context As WInfoContext)
ContextInfo = context

' This loads data on page .

mUnitList = GetUnitList()

End Sub


#EndRegion

HomePage.VB (from here the windows are launched)
Private Sub UnitListClick(B yVal sender As Object, ByVal e As Navigation)

Dim target As New WindowLaunch()

With target

.ContentType = GetType(UnitLis tView)



End With

e.NewContentInf o = target

e.NewContentBeh avior = ContentLoadBeha vior.NewWindow

End Sub



Home.XAML:

This page contains a XAMDATAGRID and left navigation links/tabs. By selecting the stage or case(depending on the selected stage of male /female/child ,it displays that particular window through left navigation/tabs


How to display different window data on diffrent tabs page loads. I have only 1 constructor in View model. How does this works?? How to invoke my single constructor for 3 window displays. I heard that this forum is having full of dotnet experts. Please let me know if you need any more data.


Thanking you in advance.
Feb 1 '10 #1
0 1163

Sign in to post your reply or Sign up for a free account.

Similar topics

3
2555
by: Tim Thomas | last post by:
Hi, I am very new to .NET and am in the process of building my first web application. I will briefly describe what i am trying to achieve: I have a system where suppliers register their details, their locations, and then add themselves to categories. Each category requires additional info from the suppliers, this additional category info...
1
7556
by: Shourie | last post by:
I've noticed that none of the child controls events are firing for the first time from the dynamic user control. Here is the event cycle. 1) MainPage_load 2) User control1_Load user clicks a dropdown in UC1 _________________________ 1) MainPage_Load 2) User Control_1 Load
1
8373
by: Edward | last post by:
I am having a terrible time getting anything useful out of a listbox on my web form. I am populating it with the results from Postcode lookup software, and it is showing the results fine. What I want to do is to allow the user to click on the row that corresponds to the correct address, and have the code behind populate the form's...
12
3973
by: moondaddy | last post by:
I have a dropdown combo box on a form and I have its AutoPostBack property set to true. When I select something from the list it does a postback and then the Page_Load event fires followed by it's SelectedIndexChanged event. However, when I go back to this control again and select the first item in the list, it does a postback and the...
5
11729
by: Ben Fidge | last post by:
I've got a problem where some buttons placed on a user control are only firing their OnClick events when the user clicks on them for the second time. I've got the situation where some common functionality (Insert/Edit/Save/Cancel) is wrapped up in a user control. This control is embedded on several other user controls. I don't know if...
0
5732
by: Oz | last post by:
Hi Using VS.NET 2003, Windows XP SP1, We have a page which has been developed using ASP.NET. On it, is a button which when clicked is supposed to add some data to a table. When the button is selected, it causes the ServerClick event to be called twice. Here's the code: You'll see that there are two grids on the page, and that the...
1
5248
by: Raed Sawalha | last post by:
I am trying to sort a DataGrid in a user control that is programatically loaded when a link button is clicked. UC1 is loaded onto Page1.aspx after clicking a link button. No problem, loads fine. How do I call the following event on UC1 when the sort collumn of the data grid is clicked? Sub DataGrid1_SortCommand(ByVal s As Object, ByVal e...
8
3167
by: mark.norgate | last post by:
I've run into a few problems trying to use generics for user controls (classes derived from UserControl). I'm using the Web Application model rather than the Web Site model. The first problem I'm having is that the partial class signature in my projectDetails.ascx.cs file looks like this: public partial class...
9
3176
by: Gummy | last post by:
Hello, I created a user control that has a ListBox and a RadioButtonList (and other stuff). The idea is that I put the user control on the ASPX page multiple times and each user control will load with different data (locations, departments, etc.).
1
3095
by: Andrew Jocelyn | last post by:
Hi I have a Formview control in a UserControl. The server-side validation is not working, i.e. the events are not firing when a button control which causes validation is fired or even when Page.Validate() is explicitly called. I'm loading the FormView as an IBindableTemplate as in this article but I don't think this is the reason for the...
0
7809
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8312
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
8183
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6569
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5366
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3809
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2312
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1413
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1147
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.