GetCustomBindablePropertyDescriptors


Author
Message
Doug Birtell
Doug Birtell
StrataFrame Beginner (33 reputation)StrataFrame Beginner (33 reputation)StrataFrame Beginner (33 reputation)StrataFrame Beginner (33 reputation)StrataFrame Beginner (33 reputation)StrataFrame Beginner (33 reputation)StrataFrame Beginner (33 reputation)StrataFrame Beginner (33 reputation)StrataFrame Beginner (33 reputation)
Group: Forum Members
Posts: 33, Visits: 64
I am attempting to create a custom field on a BO that consists of 2 columns, the persons first name and the persons last name.

I have created the custom field property as...

/// <summary>

/// FirstAndLastName

/// </summary>

/// <remarks></remarks>

[Browsable(false),

BusinessFieldDisplayInEditor(),

Description("FirstAndLastName"),

DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]

public System.String FirstAndLastName

{

get

{

return (System.String)this.CurrentRow["FirstName"] + " " + (System.String)this.CurrentRow["LastName"];

}

}

But, I'm having issues with creating the discriptor.  The problem is that when I run the form, I get a null reference exception.  The code I'm using (straight from other examples) appears to be missing something...

protected override FieldPropertyDescriptor[] GetCustomBindablePropertyDescriptors()

{

return new FieldPropertyDescriptor[] { new ReflectionPropertyDescriptor("cust_fullname", GetType()) };

}

The problem appears to be in the GetType method.

Any ideas?  I know this has to be a simple one.

Thanks,

Doug


Doug Birtell
Doug Birtell
StrataFrame Beginner (33 reputation)StrataFrame Beginner (33 reputation)StrataFrame Beginner (33 reputation)StrataFrame Beginner (33 reputation)StrataFrame Beginner (33 reputation)StrataFrame Beginner (33 reputation)StrataFrame Beginner (33 reputation)StrataFrame Beginner (33 reputation)StrataFrame Beginner (33 reputation)
Group: Forum Members
Posts: 33, Visits: 64
Never mind.

I'm an idiot.

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
LOL....not at all...I figured you would see it pretty quick...and I was right BigGrin
StrataFrame Team
S
StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Yep, syntax is different for C#... typeof(Type), not GetType(Type).
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search