I use an ICD9 object in my Patient Diagnosis object.
public ICD9 diagnosisId { get { return _diagnosisId; } set { _diagnosisId = value; } }
Inside the ICD9 is a public Description field
I define the mapping file as this: <many-to-one name="diagnosisId" column="diagnosisId" class="HospiceCare.Core.Domain.ICD9, HospiceCare.Core" />
My grid view has this templatefield and the SORTING ISN'T WORKING. BUT THE Description displays fine when reference, but the sorting bombs.
<asp:TemplateField HeaderText="Diagnosis" SortExpression ="diagnosisId.Description" > <ItemTemplate ><a href="EditPatientDiagnosis.aspx?Action=Edit&PatientDiagnosisID=<%#Encryption.Encrypt(Eval("ID").ToString()) %>&PatientGUID=<%#Eval("PatientGUID").ToString()%>"><%# Eval("diagnosisId.Description")%></a> </ItemTemplate></asp:TemplateField>
Please HELP. I have been searching for hours on how to do this. It's a simple concept that I can't get working.
|