473,386 Members | 2,042 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,386 software developers and data experts.

Generic user control: can it be done?

Hi folks

I'm trying to refactor a user control into a generic class:

public partial class BrowseModuleBase<T> : UserControl
where T : DataSet, ILoadable

This compiles fine, but the designer is ignoring the
existing control design and showing the default blank design.

When I run the code, InitializeComponent() runs all the
original code in the designer, and the control shows up in
the debugger as a child of the form and with all its
properties. But in the running application the control is blank.

A generic class can have a non-generic class as its base, so
I would have thought that in theory this should be doable.
Is it possible? And if so, I'd appreciate any pointers about
how to get it working.
Mar 26 '06 #1
0 4576

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

Similar topics

3
by: .Net Newbie | last post by:
I'm new to .Net and need to create a generic (free) way to update lookup tables in SQL Server (using C#) in ASP.Net pages. I found an article at:...
0
by: sda | last post by:
Hi everybody, I have a problem to fire an event in a DataGrid. 1/ I have got a datagrid in a generic user control protected System.Web.UI.WebControls.DataGrid dgListDataGrid; ........ ...
5
by: Richard Brown | last post by:
Ok, I've been looking through the .NET SDK docs and stuff. I'm wondering if you can provide a control extender that does generic validation or functionality just by dropping it on the form. For...
1
by: Peter Nofelt | last post by:
Hey All, I'm wondering if I'm able to have create generic user controls in .net 2.0 much like one can create generic classes. I would like to do this so that I can handle a set a types derived...
8
by: kasper.rung | last post by:
I have a problem formulating a test to see if an object is implementing a generic interface. I have the following: public interface IGeneric<T> { void Foo(); }
6
by: Milsnips | last post by:
Hi there, this is what i'm trying to achieve, i have separate identical classes for SqlClient, OracleClient, Odbc and OleDb, what i want is to create a Wrapper class that calls any of these 4...
3
by: Seth Gecko | last post by:
Hi I am working with generic lists of various objects and a control dealing with these lists. For instance: A parent form holds: dim Walls as List(Of wall) dim Segments as List(Of segment) ...
1
by: Kuldeep | last post by:
Framework: Visual Studio 2005, ASP.NET Programing Language: C#.NET I am using a Generic List Collection to fetch a particular master data from the database. Once collected, I use this Collection...
3
by: Boris | last post by:
I have a class which should like this ideally: generic <typename T> public ref class ManagedClass { T ^managedMember; UnmanagedClass<U*unmanagedMember; }; I actually would like to specify...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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
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
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...

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.