Databinding to a Custom Control's Textbox
- From: "Ron" <rs_herhuth@xxxxxxxxx>
- Date: Tue, 4 Mar 2008 09:05:22 -0500
I have a custom control that comprises of a label and a textbox. I have added the Design Time Properties for the designer to select the DataSource and DataMember, those seem to work fine at Design Time. But at Run Time the TextBox remains empty. How do I "Wire Up" the DataSource/Datamember so that the data shows in the TextBox?
This is the portion of the code Im using to set the DataMember/Source properties:
[Editor("System.Windows.Forms.Design.DataMemberListEditor,System.Design, Version=2.0.0.0, Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))]
public string DataMember
{
get
{
return m_DataMember;
}
set
{
m_DataMember = value;
}
}
[AttributeProvider(typeof(IListSource))]
public object DataSource
{
get
{
return m_DataSource;
}
set
{
m_DataSource = value;
}
}
Thank you for any help or tutorials on the subject!
Ron
.
- Prev by Date: Re: Autoexit of textbox
- Next by Date: ApplicationURI is null
- Previous by thread: Re: Start a thread and forget about it?
- Next by thread: ApplicationURI is null
- Index(es):
Relevant Pages
|