Hi i have tried to use your calendarinfo and ultratimelineview and when i use the designer ... he always throw me this exception "In current data source there is no column named: Id"
I have a Id in my databinding class
public class Person { public string Name { get; set; } public int Id { get; set; } }
this.ultraCalendarInfo1.DataBindingsForAppointments.BindingContextControl = this; this.ultraCalendarInfo1.DataBindingsForOwners.BindingContextControl = this; this.ultraCalendarInfo1.DataBindingsForOwners.DataSource = this.personBindingSource; this.ultraCalendarInfo1.DataBindingsForOwners.KeyMember = "Id"; this.ultraCalendarInfo1.DataBindingsForOwners.NameMember = "Name";
Hello pmorin,
I am not able to understand what is happening exactly from this piece of code. Where is this code? Are you sure that you have this 'DataSource' initialized at the moment of binding?
Could you please try to attach, if possible, a small sample project, reproducing the above mentioned issue, I will be happy to take a look at it?
this piece of code is in the initializeComponent
// // ultraCalendarInfo1 // this.ultraCalendarInfo1.DataBindingsForAppointments.BindingContextControl = this; this.ultraCalendarInfo1.DataBindingsForOwners.BindingContextControl = this; this.ultraCalendarInfo1.DataBindingsForOwners.DataSource = this.personBindingSource; this.ultraCalendarInfo1.DataBindingsForOwners.KeyMember = "Id"; this.ultraCalendarInfo1.DataBindingsForOwners.NameMember = "Name"; // // personBindingSource // this.personBindingSource.DataSource = typeof(WindowsFormsApplication1.MyFuckingTimeLineView.Person);
Then, i don't have the change to set my personbindingSource to any collection because the initializeComponent throw me the exception.
You can check my attached file.
By the way, i am using infragistics 9.2 with patch 2119
Another bug onto the calendarinfo, if you set the NameMember and KeyMember to the same properties for DatabindingForOwners, a exception is throw at the runtime.
Hello,
I do not see how this could work since your bindingsource does not have a datasource assigned. I suggest you move this code out of the designer and place it for example in the constructor after the 'InitializeComponent()' method. This is just an example, the code must be after setting the datasource in any case.
As to the exception - why would you want the same property? The members should be assigned different column keys.
Please feel free to let me know if a question about our tool set comes up on your mind.
OK well... the designer for ultracalendarinfo let me set my properties at design time and you say me to set them at the runtime ? Why the properties "DataBindingForOwners" is not [Browsable(false)] then ?
Thats make no sense.
Also, for the other bug. My Name and key for the owner is the same value. I don't want to have 2 properties into my owner class. I really don't know why using the same properties is a problem.
I am checking about the progress of this issue. Please let me know If you need any further assistance on this.
This is the same as adding two columns to a DataTable with the same column name. The name of each field has to be unique so as to be distinguishable from other fields.
The Owner.Name property resolves to Owner.Key so there is no benefit to binding to both for the same value.