Hi:
im building a
vb.net web based application. i have a datagrid that holds 2 columns. one is a templete column and the other is a bound column. the template column when clicked takes you to a differenet page. im trying to sort these 2 columns, but currently i can only sort on the template column. the bound column doesnt get sorted. below is the code that i wrote for it:
Dim dvContractor As New DataView(objFailure.loadWellWithoutCode(adoCnData) .Tables(0))
Dim intloop As Integer
For intloop = 0 To dgWithoutCode.Columns.Count - 1
If dgWithoutCode.Columns(intloop).SortExpression = e.SortExpression Then
If dgWithoutCode.Columns(intloop).FooterText = "" Or dgWithoutCode.Columns(intloop).FooterText = " DESC" Then
dgWithoutCode.Columns(intloop).FooterText = " ASC"
Else
dgWithoutCode.Columns(intloop).FooterText = " DESC"
End If
Exit For
End If
Next
dvContractor.Sort = e.SortExpression & dgWithoutCode.Columns(intloop).FooterText
dgWithoutCode.DataSource = dvContractor
dgWithoutCode.DataBind()
kindly advise.
Thanks.