473,513 Members | 2,401 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VB-Web: Gridview inheritence and overloading

Bob Ross
119 New Member
I am trying to create a custom gridview control that has customisable columns.
I want to be able to use the the control as I would any other gridview except a couple of extra methods and properties and when I call -
Expand|Select|Wrap|Line Numbers
  1. CustomGridview.Columns(10)
it uses a mapping function created by me to return the correct column.
But when I call
Expand|Select|Wrap|Line Numbers
  1. CustomGridview.Columns()
it returns the column collection from the base gridview class.
I think I have achieved that using -
Expand|Select|Wrap|Line Numbers
  1. Public Overloads ReadOnly Property Columns(ByVal Index As Integer) As DataControlField
  2.             Get
  3.                 Return SomeMappingFunction(Index)            
  4.             End Get
  5.         End Property
In the new in the new CustomGridview class deriving from the Gridview class.

But when I attempt to use this class as a control on the page I get a errors
"Ambigous match found"
and
"Type 'System.Web.UI.WebControls.CustomisedGridview' does not have a public property named 'TemplateField'."
for each element inside the <columns> tag.
What am I doing wrong? How can I get it to use the original columns collection for the <columns> tag on the page?
Apr 9 '08 #1
0 730

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

Similar topics

72
3405
by: Robin Tucker | last post by:
I need to find some documents/research for my manager about VB.NET v C# use. I've noticed that there are many more people using C# than VB.NET, that there seem to be more job vacancies specifying...
12
1639
by: Leo Muller | last post by:
I always thought that moving from VB.NET to C# would be very easy. Even though so far it hasn't been hard, there are some annoying things, that may have to do with my visual studio settings. -...
16
2565
by: Ben Hannon | last post by:
Hi, I'm writting a COM Class in VB.NET to be used in a VB6 project (Tired of the VB6 hassles with cloning and serializing an object). All my classes I need cloneable/serializable are now in a...
182
7356
by: Jim Hubbard | last post by:
http://www.eweek.com/article2/0,1759,1774642,00.asp
25
1794
by: Sharrukin Amiri | last post by:
Hello, I am using VB 6.0 for many years. Everytime I needed to build software applications, I just opened VB 6.0 and started coding. I am now looking VB.NET Express Edition and I find I can no...
2
1671
by: D H | last post by:
Hi, Hi, I was looking for your opinion on VB.NET - its long-term prospects, etc. Sorry this is vague, but it's not meant to be a troll. It's a pro-VB.NET post actually. I haven't used VB or...
19
3064
by: lonelyplanet | last post by:
Hi, I'm studying for 70-306 using the book "MCAD/MCSD Visual Basic .NET Windows Applications" published by McGraw Hill (ISBN: 0-07-212583-7). I found the book has no programming exercise...
62
5108
by: zacks | last post by:
A co-worker where I work is proposing all future code devopment be done in Visual C#. Here is his assessment of VB: VB.NET is hack as far as the CLR(Common Language Runtime) goes. It was...
12
2121
by: Striker | last post by:
I have never used VB, so sorry for the novice questions. I have a very small app in vba that only uses excel as a place to put a button and some code that I need to move to VB. Now it seems...
0
7264
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
7386
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
7534
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...
0
5689
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,...
1
5094
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4749
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...
0
3226
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1601
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 ...
1
805
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.