Winform Designer question


Author
Message
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
Glad you got it figured out.
Michael Reese
Michael Reese
StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)
Group: StrataFrame Users
Posts: 235, Visits: 1.6K
Ok,

What happened was that I had set the datasource through the gui and the BindingContextControl to the mainform. The schedule control was on a tabcontrol. When VB serialized the controls it placed the BBS and BO code below the Schedule control code. So I got the errors stating that the configuration columns did not exist.

So it appears that the schedule control is behaving differently. The final fix was to manually configure it. 

Although performance is awful, this seems to have solved it.

Example

Me.CalendarInfo.DataBindingsForAppointments.DataSource = Me.BOScheduleCenter '(Me.scheduleData, "Owners")

' Set the BindingContextControl so the component will use the same(context)

' that the grid and any other controls on the form are using.

Me.CalendarInfo.DataBindingsForAppointments.BindingContextControl = Me

' Basic Schedule properties

'CalendarInfo

Me.CalendarInfo.DataBindingsForAppointments.DataKeyMember = "ID"

Me.CalendarInfo.DataBindingsForAppointments.DataSource = Me.BBSScheduleCenter

Me.CalendarInfo.DataBindingsForAppointments.DescriptionMember = "Description"

Me.CalendarInfo.DataBindingsForAppointments.EndDateTimeMember = "EndDateTime"

Me.CalendarInfo.DataBindingsForAppointments.OriginalStartDateTimeMember = "OriginalStartDateTime"

Me.CalendarInfo.DataBindingsForAppointments.OwnerKeyMember = "OwnerIndex"

Me.CalendarInfo.DataBindingsForAppointments.RecurrenceIdMember = "RecurrenceId"

Me.CalendarInfo.DataBindingsForAppointments.RecurrenceMember = "Recurrence"

Me.CalendarInfo.DataBindingsForAppointments.ReminderEnabledMember = "ReminderEnabled"

Me.CalendarInfo.DataBindingsForAppointments.ReminderIntervalMember = "ReminderInterval"

Me.CalendarInfo.DataBindingsForAppointments.ReminderUnitsMember = "ReminderUnits"

Me.CalendarInfo.DataBindingsForAppointments.StartDateTimeMember = "StartDateTime"

Me.CalendarInfo.DataBindingsForAppointments.SubjectMember = "Subject"


StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
If the UltraSchedule component works anything like their UltraGrid, it doesn't touch the data source until it hits the ISupportInitialize.EndInit() method (which always gets called at the end of the designer-generated code.  So, it shouldn't be trying to grab columns from the BBS's ITypedList interface until the end of the InitializeComponent method, when the BBS & BO have been configured.
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
No.  You will have to inherit their control, and then add this interface.  Then drop YOUR control on the form.
Michael Reese
Michael Reese
StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)
Group: StrataFrame Users
Posts: 235, Visits: 1.6K
But I do not think the the Ultraschedule control supports this?
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
You can't control the order of how the form designer serializes the items in the partial class.  This is why we created the IInitOnFormLoad interface.  You can implement this interface and then control the loading order through the ParentFormLoading event.  You can see an example of this and how to implement it on the BusinessLayer or ComboBox in the source code.  There are a number of other controls that implement this as well, but the combo would probably be an easy one to look at to get an idea of how to implement the interface.
Michael Reese
Michael Reese
StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)
Group: StrataFrame Users
Posts: 235, Visits: 1.6K
This might be a dumb question but I am using the Ultraschedule component which when placed on a form along with a BBS and BO will build before the BO,BBS in the designer. Of course I keep getting an error because the component will attempt to call the BO columns before the BO has had a chance to be declared. I can mannully fix this but it reverts back once I move something on the form.

How do I make the following code display above the schedule component??

Thanks

'BBSScheduleCenter

Me.BBSScheduleCenter.BusinessObject = Me.BOScheduleCenter

Me.BBSScheduleCenter.ParentForm = Me

'

'BOScheduleCenter

'

Me.BOScheduleCenter.ChildAutoFilterOption = MicroFour.StrataFrame.Business.AutoChildFilterOptions.MatchCurrentRow

Me.BOScheduleCenter.ParentBusinessObject = Me.BoSite

Me.BOScheduleCenter.ParentContainer = Me

Me.BOScheduleCenter.SynchronizingObject = Me

'BBSChangeControl


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