DataSourceKey error within User Control


Author
Message
Tim Dol
Tim Dol
StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)
Group: Forum Members
Posts: 340, Visits: 1.4K
I have created a User Control that basically displays data on an Infragistics Grid control using a BusinessBindingSource.  I added a line of code to fill the business object.

When I drag this control onto a form I get an error. (See Attached Doc). I'm not sure if I'm doing something wrong as I can fill the same business object on a normal form without any problems.

Thanks,

Tim

Attachments
UserControlError.doc (85 views, 159.00 KB)
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
Yes, you are not testing for design-time.  Your fill method is either in the New or the Load and since you are at design-time you do not have a connection string (or DAL) defined.  Be sure and use an event such as the Load rather than the New because the design-time indicator may not yet be set in some cases.

If Not Me.DesignMode Then
  '-- Fill your BO
End If

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