Hi,
I'm looking for the way to apply an order by in the list of my displayed owners
so i try to use the linq order by like this :
base.TimelineController.CalendarInfo.DataBindingsForOwners.KeyMember = "HouseRecordID"; base.TimelineController.CalendarInfo.DataBindingsForOwners.NameMember = "HouseNo";
base.TimelineController.CalendarInfo.DataBindingsForOwners.DataSource = lstHouseView.OrderBy(p=>p.HouseNo);
doesn't work.
thx
Hi Lahmar,
What is not working exactly, do you get any errors with the code?
Could you please review the sample attached to this post and see if it meets your requirements. Please feel free to let me know if I misunderstood you or if you have any other questions.
I attached my example ...
the message i get is [In current data source there is no column named: HouseRecordID]
only the first line pass; when i want to do a sort i get the error message.
//this.ultraCalendarInfo1.DataBindingsForOwners.DataSource = lstHouses; this.ultraCalendarInfo1.DataBindingsForOwners.DataSource = lstHouses.OrderBy(p=>p.HouseRecordID); //this.ultraCalendarInfo1.DataBindingsForOwners.DataSource = (from r in lstHouses // orderby r.HouseRecordID //
Hello,
The datasource you are passing to the calendar info is not being recognizable with the fields you are specifying as 'KeyMember' and 'NameMember'. This is the reason why the calendarinfo says there is no such column. If you comment out the 'KeyMember' assignment you will see that you will get the same exception for the 'NameMember'. What is your final goal - is it to sort the owners, just want to be sure and clarify this?
The Datasource contains a value objects that contains the fields ; i don't undersdand ?
Can you fix me that or give me an example like that without Datatable i want a list of value object that i can sort the Owners.
This is more like a thing related to the .NET data sources types. You could sort your data in some way and then add it to a simple datatable, which our 'UltraCalendarInfo' schedule component would understand.
Do you need any assistance on our toolset?