This is a migrated thread and some comments may be shown as answers.

HeaderText on GridClientSelectColumn

1 Answer 120 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Lenny_shp
Top achievements
Rank 2
Lenny_shp asked on 18 Feb 2009, 04:46 PM
Is it possible to put some kind of text on GridClientSelectColumn's header?   HeaderText doesn't do anything.

I already have this code to hide the checkbox.

    Private Sub RadGridAttachment_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGridAttachment.ItemDataBound
        'Hide the client side checkbox in the header
        If TypeOf e.Item Is GridHeaderItem Then
            Dim header As GridHeaderItem = DirectCast(e.Item, GridHeaderItem)
            header("ClientSelectColumn").Controls(0).Visible = False
        End If
    End Sub

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 19 Feb 2009, 04:39 AM
Hi,

Try the following code snippet to set the HeaderText of the GridClientSelectColumn.

VB:
 
 
     Protected Sub RadGrid1_ItemDataBound(ByVal sender As ObjectByVal e As GridItemEventArgs) 
         If TypeOf e.Item Is GridHeaderItem Then 
             Dim headerItem As GridHeaderItem = TryCast(e.Item, GridHeaderItem) 
             headerItem("SelectCol").Controls(0).Visible = False 
             headerItem("SelectCol").Text = "SelectColumn" 
         End If 
     End Sub 
 
 


Thanks
Shinu
Tags
Grid
Asked by
Lenny_shp
Top achievements
Rank 2
Answers by
Shinu
Top achievements
Rank 2
Share this question
or