473,394 Members | 1,817 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

question of class design wrt databinding

Hello,

I am facing a design problem here & need your expert design advice on
this.
Scenario:

I have a class called Vendor - which has several simple attributes like
Name, Address etc
Now, each vendor has some attributes - which are not "simple"
Basically, they can be an instance of another class

for eg
Vendor
Name (string)
ContactPerson (Person)
Name (string)
Phone (string)
City

Here, VendorName, city comes from 1 table & Contact Person data comes
from another table

What is the ideal way to make sure that I have an object instance
filled up?
i.e. load the data up-front
Vendor v = Utility.GetVendor("111"); //this will query & fill Vendor as
well as ContactPerson info
(constructs the object entirely - even though some properties might not
be read at all)

or query it seperately based on what is needed ?

Now, I need to display Vendor Name, ContactPersonName in some container
using databinding.

If it were look like below, it would be a straight binding

Vendor
Name (string)
ContactPersonName (string)
ContactPersonPhone (string)
City

Is the design 1 valid design?
If design 1 is valid, how do I achieve databinding?

Is design 2 valid - as it helps to achieve databinding ?

I hope this is enough to explain the scenario
If not please post it here - so that I can elaborate it

Kalpesh

Feb 2 '06 #1
0 928

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Ben R. | last post by:
This question refers to: http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q313482 First question: >> The following code binds a TextBox control and a DataGrid control to the same...
0
by: Mats Lycken | last post by:
Hi, I'm working on a project that involves keeping journals from rehabilitation work. The program is really data oriented and all data is stored in xml. A part of the data is stored as...
3
by: Marcelo | last post by:
Hello, I am trying to create a postback event, and it is working, just not calling the sub. I have a datagrid which has <asp:DataGrid id="Mensajes" ... <Columns> <asp:HyperLinkColumn ....
5
by: Aussie Rules | last post by:
Hi, Having a mental block on this one. Have done it before but can't rack my brain on how... I have an object, with a bunch on property, and I add that object to a combo box. I want the...
4
by: Darren | last post by:
This is a theoretical question, meaning I don't have any specific code to show. On a large ASP.NET 1.1 application what is the best way to populate a forms data fields if you expect a large...
2
by: Kalpesh | last post by:
Hello, I am facing a design problem here & need your expert design advice on this. Scenario: I have a class called Vendor - which has several simple attributes like Name, Address etc Now,...
0
by: Kalpesh | last post by:
Hello, I am facing a design problem here & need your expert design advice on this. Scenario: I have a class called Vendor - which has several simple attributes like Name, Address etc Now,...
7
by: Ryan | last post by:
I'm in the process of learning more about building my ASP.NET website to use my SQL datastore and am a bit confused about how ADO.NET works with ASP.NET. This Microsoft article implies that using...
1
by: Mark Olbert | last post by:
Has anyone else noticed that the design-time support for databinding in custom controls in ASPNET2 sucks? At least for GridViews? So far I've spent going on two days trying to get the following...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...

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.