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 / Windows Forms / Design Time / May 2004

Tip: Looking for answers? Try searching our database.

Combobox DataSource property at design time

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Vasyl - 05 May 2004 16:25 GMT
Hi all,

I've created a combobox column style for the datagrid control. It works fine
except of editing properties in the Visual Studio designer .
In particular I want to change the property DataSource at design time.
Have following code:

public class DataGridComboBoxColumn : DataGridColumnStyle
{
    ***

    [
     Category("Data"),
     TypeConverter(typeof(System.Web.UI.Design.DataSourceConverter))
    ]
    public object DataSource
    {  get   {   return combo.DataSource;  }
        set   {   combo.DataSource = value;  }
    }

    ***
}

DataSource  property really appears in the DataGridColumnStyle Collection
Editor but the dropdown box which should contain the list of datasources is
empty. Although there are several datasource objects in the form.

Does someone know how to populate the list of datasources in this case?

Any help is very much appreciated.

Vasyl
Rami Saad - 09 May 2004 13:11 GMT
Hello,
Having empty combobox could have one of the several reasons. How are you
populating the combobox? from dataset? did you fill the dataset?
Did you try to populate it dynamically, in the code? what happens if you do
so?
I would be glad to help you more. Tell me in more details about the
combobox filling.

Regards,
Rami Saad
MEA Developer Support Center
ITworx on behalf of Microsoft EMEA GTSC
Rami Saad - 11 May 2004 11:58 GMT
Hello,
Having empty combobox could have one of the several reasons. How are you
populating the combobox? from dataset? did you fill the dataset?
Did you try to populate it dynamically, in the code? what happens if you do
so?
I would be glad to help you more. Tell me in more details about the
combobox filling.

Regards,

Rami Saad
MEA Developer Support Center
ITworx on behalf of Microsoft EMEA GTSC

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.