Call in pageload:
LocalizeGridView(GridView1, LocalResourceFile)
and put this somewhere:
Public Shared Sub LocalizeGridView(ByVal gv As GridView, ByVal ResourceFile As String)
Dim key As String
Dim localizedText As String
Dim pi As System.Reflection.PropertyInfo
For Each col As DataControlField In gv.Columns
key = col.HeaderText
If key <> "" Then
localizedText = Localization.GetString(key & ".Header", ResourceFile)
If localizedText <> "" Then
col.HeaderText = localizedText
End If
End If
'Localize text of Cancel, Delete, Edit, Insert, Select, New, Update buttons
If TypeOf col Is CommandField Then
Dim cmdField As CommandField = DirectCast(col, CommandField)
For Each cmdName As String In New String() {"Cancel", "Delete", "Edit", "Insert", "Select", "New", "Update"}
pi = cmdField.GetType.GetProperty(cmdName & "Text", GetType(String))
key = CType(pi.GetValue(cmdField, Nothing), String)
If Not String.IsNullOrEmpty(key) Then
localizedText = Localization.GetString(key & ".CommandText", ResourceFile)
If localizedText <> "" Then
pi.SetValue(cmdField, localizedText, Nothing)
End If
End If
Next
End If
Next
End Sub