473,659 Members | 2,526 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Rows

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.A dd(MyNormalRow)

MyParent.Rows.A dd(MyInputRow)

MyParent.Rows.A dd(MyCheckRow)

....

What should be the best way to do this?

Thanks,

Miguel

Oct 29 '07 #1
3 1002
It happens that shapper formulated :
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.A dd(MyNormalRow)

MyParent.Rows.A dd(MyInputRow)

MyParent.Rows.A dd(MyCheckRow)

...

What should be the best way to do this?

Thanks,

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
Oct 29 '07 #2
On Oct 29, 3:24 pm, Hans Kesting <invalid.han... @spamgourmet.co m>
wrote:
It happens that shapper formulated :
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.A dd(MyNormalRow)
MyParent.Rows.A dd(MyInputRow)
MyParent.Rows.A dd(MyCheckRow)
...
What should be the best way to do this?
Thanks,
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
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

Oct 29 '07 #3
shapper explained :
On Oct 29, 3:24 pm, Hans Kesting <invalid.han... @spamgourmet.co m>
wrote:
>It happens that shapper formulated :
>>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(MyNormalRo w)
>>MyParent.Rows .Add(MyInputRow )
>>MyParent.Rows .Add(MyCheckRow )
>>...
>>What should be the best way to do this?
Thanks,
>>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

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
Correct

Hans Kesting
Oct 31 '07 #4

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

Similar topics

7
12067
by: Egor Shipovalov | last post by:
I'm implementing paging through search results using cursors. Is there a better way to know total number of rows under a cursor than running a separate COUNT(*) query? I think PostgreSQL is bound to know this number after the first FETCH, isn't it? On a side note, why queries using LIMIT are SO terribly slow, compared to cursors and sometimes even ones without LIMIT? Shouldn't LIMIT be internally implemented using cursor mechanism then?...
6
2301
by: dddddddd2444444 | last post by:
Hi,please help... It works fine when I define a 2-D array like char code. But it won't work when I try to define the array dynamically using a function. It just crashes. Does anyone know why? The compiler i'm using is Dev c++. #include <stdio.h> #include <stdlib.h>
7
3913
by: GaryB | last post by:
I have an untyped datatable that has financial numbers and controls that were populated by code (not a simple fill from a DA). Now I want to insert subtotals into it. I wrote a sub to do so that uses InsertAt(myrow,i). When I trace through the sub it is doing the insertat and the value of i is correct. But when I bind my dataset to a datagrid all of my inserted rows are at the end? code is below. What am I doing wrong? thanks, G
0
1824
by: Subba Rao via DotNetMonster.com | last post by:
---------------------------HTML---------------------------------------- <html> <head> <title>:: DHTML Table Demo ::</title> <script langauge="javascript" src="InterchangeRows.js"></script> <style> .mainTable { background-color: black; color: white; font-face: tahoma;
12
1993
by: Graham Blandford | last post by:
Hi all, Would someone be able to tell me the most 'graceful' way of removing unwanted rows from a dataset based on a condition prior to update? OR, resetting the rows all to unchanged after they are initally added to the recordset. I create a dataset, which begins empty after the initial .Fill. Then I create several rows with some default information, leaving one
68
6795
by: Martin Joergensen | last post by:
Hi, I have some files which has the following content: 0 0 0 0 0 0 0 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1 1 0 0 0 0 0 0 0
11
8019
by: jimstruckster | last post by:
I have a table with 10 rows, I want all rows except for the first to be hidden when the page first opens up. If the user puts a value in a text box in the first row then I want the second row to display. If they put a value in the text box in the second row then display the third row etc. etc. etc. to 10 rows. I'm pretty new to javascript, so I'm not to sure where to start. Any help would be great, thanks a lot.
3
5399
by: Niyazi | last post by:
Hi all, I have a dataTable that contains nearly 38400 rows. In the dataTable consist of 3 column. column 1 Name: MUHNO column 2 Name: HESNO Column 3 Name: BALANCE Let me give you some example first:
0
1792
by: rn5a | last post by:
All the rows in a DataGrid are accompanied by a CheckBox. When a user checks the rows & clicks a Button, the checked rows get deleted. For e.g. assume that the DataGrid displays 10 rows. A user checks the rows 2, 4, 6, 8 & 10. When he clicks the Button, the page posts & the next page displays only 5 rows i.e. row 1, 3, 5, 7 & 9. The checked rows are populated in a ViewState variable & will have values like 2, 4, 6, 8, 10, (note that there...
3
3915
by: nigelesquire | last post by:
Please help! I'm trying to clone and delete multiple rows with JavaScript. I need two delete buttons that work...! I only have one for now, but it's not working properly, the output count is messing up. Problems:
0
8341
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8751
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8539
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8630
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7360
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5650
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4176
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2759
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
2
1739
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.