473,395 Members | 1,987 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,395 software developers and data experts.

class design problem & databinding


I am facing a design problem here & need your expert design advice on

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
Name (string)
ContactPerson (Person)
Name (string)
Phone (string)

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

Name (string)
ContactPersonName (string)
ContactPersonPhone (string)
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


Feb 1 '06 #1
2 1397
Can anybody advice me on this?


Feb 2 '06 #2
Experts please !!!!


Feb 2 '06 #3

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

Similar topics

by: Richard | last post by:
Hi, I'm having issues with DataBinding. I have a Form with two data bound comboboxes on it. When you select something in one combobox I may {or may not} want to change the selected item in the...
by: sdbranum | last post by:
I have been using Visual C#.NET to code a large project having many data adapters, data sets, datagrids, multiple forms with tab pages, each containing various controls (mostly label, text boxes,...
by: eye5600 | last post by:
Is there a cure for the problems using databinding with a DateTimePicker? I find that a) sometimes it works, sometimes it doesn't, and b) it fails silently causing all databinding on the DataSet...
by: Vik | last post by:
Concatenation operator & used in the databinding expressions for the datagrid template columns appears as '&' in HTML. It causes an error when opening the pages. I have to replace '&' by '&' each...
by: Colin Robinson | last post by:
Help please I have an example class called Person with 2 public properties Firstname and Lastname, I cant create a textbox on an asp.net form bound to the Person.Firstname property Can...
by: M | last post by:
I binding controls to a dataset at design time. I find the checkboxs will cause the program crash when one of these databinding fields is dbnull. The only way for me is not set databindings for...
by: Trammel | last post by:
Hi, I recently upgraded to VB.net from VB6.. and woah... I feel lost :O One of my reasons for upgrading is I was told that VB.net can do class inheritance and subclassing easier. ...
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,...
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...
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
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,...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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.