Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / October 2007

Tip: Looking for answers? Try searching our database.

Rows

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
shapper - 29 Oct 2007 13:18 GMT
Hello,

I created a custom control, Parent, with the following property:

Property Rows As Generic.List(Of Row)

Row is another custom control that creates some code.

The problem is that I want to create different types of rows:
InputRow, CheckRow, ...

All rows render the same way, i.e., a div with content inside it. The
content in the div is different for each row.

Basically I would like to do something like:

Dim MyParent As Parent

MyParent.Rows.Add(MyNormalRow)

MyParent.Rows.Add(MyInputRow)

MyParent.Rows.Add(MyCheckRow)

...

What should be the best way to do this?

Thanks,

Miguel
Hans Kesting - 29 Oct 2007 16:24 GMT
It happens that shapper formulated :
> Hello,
>
[quoted text clipped - 27 lines]
>
> Miguel

Create a baseclass "Row" (probably needs to derive from "Control") and
derive InputRow, CheckRow, etc from that Row.

You can put common functions in the baseclass and special functions in
the various derived classes.

Hans Kesting
shapper - 29 Oct 2007 18:12 GMT
On Oct 29, 3:24 pm, Hans Kesting <invalid.han...@spamgourmet.com>
wrote:
> It happens that shapper formulated :
>
[quoted text clipped - 37 lines]
>
> Hans Kesting

So by having my classes inherit from RowClass I then can add any of
the other classes directly in property of type Generic.List(Of Row).
Is this what you mean right?

Thanks,
Miguel
Hans Kesting - 31 Oct 2007 14:27 GMT
shapper explained :
> On Oct 29, 3:24 pm, Hans Kesting <invalid.han...@spamgourmet.com>
> wrote:
[quoted text clipped - 40 lines]
> Thanks,
> Miguel

Correct

Hans Kesting

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.