Windows Develop Bookmark and Share   
 index > Windows Forms Data Controls and Databinding > How to bind Rectangle properties to a data source
 

How to bind Rectangle properties to a data source

Hello,

I am trying to bind rectangle properties to a SQL data source that I have setup. I noticed that that the rectangle properties window does not contain the DataBindings option. I am setting this up in a Windows form using VB in VS 2008. I was not able to find a similar subject in another forum. If there is one, I would appreciate it if you could direct me to it.

Thanks,

Kris
krussellm  Tuesday, August 18, 2009 12:47 AM
Hello Kris,

Thanks for your posting on MSDN forum.

I assume that you mean the RectangleShape in Visual Basic Power pack. Please correct me if there is any misunderstanding.

From a Windows Forms perspective, “Data Binding�is a general mechanism to bind data to a user interface element (Control). However, RectangleShape is drivered from Component and we cannot bind data source to an Component, thus there is no DataBindings option on the Properties Windows for an RectangleShape component. To make the RectangleShape bindable, we can create a new class that derived from RectangleShape class and implement the IBindableComponent interface. For example,

http://social.msdn.microsoft.com/forums/en-US/winformsdatacontrols/thread/0b8cba1e-f7ce-4ab0-a45b-2093dc38afc8

Thanks,
Rong-Chun Zhang
MSDN Subscriber Support in Forum
If you have any feedback on our support, please contact msdnmg@microsoft.com

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Rong-Chun Zhang  Tuesday, August 18, 2009 8:36 AM
Hello Kris,

Thanks for your posting on MSDN forum.

I assume that you mean the RectangleShape in Visual Basic Power pack. Please correct me if there is any misunderstanding.

From a Windows Forms perspective, “Data Binding�is a general mechanism to bind data to a user interface element (Control). However, RectangleShape is drivered from Component and we cannot bind data source to an Component, thus there is no DataBindings option on the Properties Windows for an RectangleShape component. To make the RectangleShape bindable, we can create a new class that derived from RectangleShape class and implement the IBindableComponent interface. For example,

http://social.msdn.microsoft.com/forums/en-US/winformsdatacontrols/thread/0b8cba1e-f7ce-4ab0-a45b-2093dc38afc8

Thanks,
Rong-Chun Zhang
MSDN Subscriber Support in Forum
If you have any feedback on our support, please contact msdnmg@microsoft.com

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Rong-Chun Zhang  Tuesday, August 18, 2009 8:36 AM
Hello,

I am writing to check the status of the issue on your side. Would you mind letting me know the result of the suggestions? If you have any additional question, welcome to post here. Have a great day!

Thanks,
Rong-Chun Zhang
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Rong-Chun Zhang  Friday, August 28, 2009 12:23 PM

You can use google to search for other answers

Custom Search

More Threads

• Help - problem with datagridview on tab control that is not active during data load
• DataRelations and ComboBox Data binding
• Reading from XML and bound to DatagridView : Adding rows dynamically
• A bug? Nobody answers this kind of question, MS Fellows?
• IndexOutOfRange Exception in DataGridView
• DataGridView date issue
• BindingComplete event isn't firing - why?
• stored procedures and vb2005
• Help with adding new record via editbox (datagridview) bounded to a datatable/dataset
• Getting selected value of databound combobox