PC Review


Reply
Thread Tools Rate Thread

Creating Custom Control with Dynamic Data

 
 
Isai
Guest
Posts: n/a
 
      4th Oct 2007
Hello,

I am using VB.NET in Visual Studio 2005 to develop ASP.NET 2.0 web
applications. I am developing a control library with all the custom
controls that I can use in my projects. One of the requirement is to
build a custom DropDownList with addition functionalities specific to
my project. When I tried to develop this control I faced a problem
that I have explained below.

I want to add a new property for this custom DropDownList. This
property will take a string value but it must come from a predefiined
set of values. This predefined set is dynamically built from a SQL
Server table and must be shown to the user as available values in the
properties window. I cannot use an enum because the values come from
a table.

Please let me know if someone has any suggestions.

Thanks, Isai.

 
Reply With Quote
 
 
 
 
jdlwright@gmail.com
Guest
Posts: n/a
 
      5th Oct 2007
Hi Isai, firstly you might want to try the control building newsgroup
as it's more specialised.

> I am using VB.NET in Visual Studio 2005 to develop ASP.NET 2.0 web
> applications. I am developing a control library with all the custom
> controls that I can use in my projects. One of the requirement is to
> build a custom DropDownList with addition functionalities specific to
> my project. When I tried to develop this control I faced a problem
> that I have explained below.
>
> I want to add a new property for this custom DropDownList. This
> property will take a string value but it must come from a predefiined
> set of values. This predefined set is dynamically built from a SQL
> Server table and must be shown to the user as available values in the


What you mean is, you want to hit the database at design time and fill
in a dropdown list in the VS property editor, so that the developer
user can choose a value?

If so I think you might want to look at the Editor attribute which can
be assigned to the class of property that you want the drop down to
appear for. You're probably going to need to delve into
UITypeEditor...

Hope that's some help
Jim

> properties window. I cannot use an enum because the values come from
> a table.
>
> Please let me know if someone has any suggestions.
>
> Thanks, Isai.



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic use of User control within custom control RichB Microsoft ASP .NET 0 24th Sep 2008 11:56 AM
Re: After creating custom container control, control cannot be added to form Michael Nemtsev [MVP] Microsoft C# .NET 1 14th Nov 2007 12:48 PM
creating a custom control that extends the DataGrid control and can be placed on the toolbox problem Wiredless Microsoft Dot NET Compact Framework 3 3rd Jun 2005 06:44 AM
"Error Creating Control" when creating a custom control (Design Time). Can't see tooltip message. Ravi Ambros Wallau Microsoft ASP .NET 0 1st Jun 2005 03:36 PM
Creating user control/custom image control to handle multilingual site SamIAm Microsoft ASP .NET 1 17th Oct 2003 09:41 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:35 PM.