I am using using the ItemCreated event handler to change to column heading based on a specified language code. The default is english and the english headings are coded in the grid definition. I use the following code to set the text.
Protected Sub RadGrid1_ItemCreated(ByVal sender As Object, ByVal e As GridItemEventArgs) Handles RadGrid1.ItemCreated
If TypeOf e.Item Is GridHeaderItem Then
Dim headerItem As GridHeaderItem = CType(e.Item, GridHeaderItem)
If lstLanguage.Text <> "en" Then
Dim m As New Misc()
Dim strText As String = m.GetText(Session("strDataConnectString"), 16, lstLanguage.Text)
headerItem("UserName").Text = strText
strText = m.GetText(Session("strDataConnectString"), 17, lstLanguage.Text)
headerItem("Subject").Text = strText
strText = m.GetText(Session("strDataConnectString"), 18, lstLanguage.Text)
headerItem("UpdateDateTime").Text = strText
End If
End If
End Sub
My problem is that once the heading text is changed, sorting is no longer active for those columns. Only if the headers are in english (the default) can I sort. I have searched for 2 hours trying to find posts regarding this and could not find any. Thanks in advance for your help.
Protected Sub RadGrid1_ItemCreated(ByVal sender As Object, ByVal e As GridItemEventArgs) Handles RadGrid1.ItemCreated
If TypeOf e.Item Is GridHeaderItem Then
Dim headerItem As GridHeaderItem = CType(e.Item, GridHeaderItem)
If lstLanguage.Text <> "en" Then
Dim m As New Misc()
Dim strText As String = m.GetText(Session("strDataConnectString"), 16, lstLanguage.Text)
headerItem("UserName").Text = strText
strText = m.GetText(Session("strDataConnectString"), 17, lstLanguage.Text)
headerItem("Subject").Text = strText
strText = m.GetText(Session("strDataConnectString"), 18, lstLanguage.Text)
headerItem("UpdateDateTime").Text = strText
End If
End If
End Sub
My problem is that once the heading text is changed, sorting is no longer active for those columns. Only if the headers are in english (the default) can I sort. I have searched for 2 hours trying to find posts regarding this and could not find any. Thanks in advance for your help.