Hi,
I have been extending the following code sample -
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnadvnet/html/v
bnet08262002.asp
Somewhere along the line though, when the DataMember variable is
initialised in generated code, it's default value is null (not "" like
I thought it would be - considering the default value). Here's my
slightly updated DataMember property code :
private string vDataMember = "";
[
Category("Data"),
DefaultValue(""),
Editor("System.Windows.Forms.Design.DataMemberListEditor,System.Design",
typeof(System.Drawing.Design.UITypeEditor))
]
public string DataMember
{
get { return(vDataMember); }
set
{
vDataMember = value;
SetSource();
if ( vAutoDiscover )
DoAutoDiscover();
DataBind();
}
} /* DataMember */
Can anybody provide me with some insights?
Regards,
Camel
joeycalisay - 14 Feb 2005 09:29 GMT
> private string vDataMember = "";
Are you sure that you are setting the string vDataMember field to an empty
string initially? Mr. Loftka's example does not, perhaps you forgot to
initialize it to an empty string contrary to your posted message.

Signature
Joey Calisay
http://spaces.msn.com/members/joeycalisay/
> Hi,
>
> I have been extending the following code sample -
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnadvnet/html/v
bnet08262002.asp
> Somewhere along the line though, when the DataMember variable is
> initialised in generated code, it's default value is null (not "" like
[quoted text clipped - 27 lines]
>
> Camel