Last post Sep 15, 2010 05:06 PM by rrrsr7205
Sep 15, 2010 06:49 AM|maan1978|LINK
I want to use Filed1 and Field2 as one column for display ,
but I do not want to override the tostring method in the class , since I want to use it in my page filter (filter1 and filter2 are the table primary key)
Is there any way to accoublish that .
Sep 15, 2010 05:06 PM|rrrsr7205|LINK
I also need to know more on this. Not only do I share your need to know how to display concatenated columns (without overriding ToString()), but I also need to know how to influence the sort order of the concatenated result. My need is primarily in generated
e.g., using Northwind Employees:
I would like to see a dropdown list showing LastName & ", " & FirstName" as the display portion and employeeId as the value, with the list of concatenated names sorted on lastName, firstName
I tried adding a property to Employee in my partial class, but (and it could be because I do not completely inderstand how the partial class interrelates with the dropdown generation), but on execution, I got an error indicating that the system could not
impose an order-by on the dropdown list. It was as If all sorting for dropdown lists is done on the actual SQL table columns and not on the properties of the Entity Class.