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

Change name of column in RadGrid - column name is "Item"

1 Answer 443 Views
Grid
This is a migrated thread and some comments may be shown as answers.
G S S
Top achievements
Rank 1
G S S asked on 20 Jun 2009, 02:23 PM
If you visit my site http://www.theplaygrounds.co.uk/ and click mp3 player, you will see the column name is Item. I bind to an arraylist, which contains a struct. Nowhere in any of these objects is there a field called "Item" so I don't know where this name comes from. Where/how can I change this?

Thanks

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 22 Jun 2009, 06:33 AM
Hello,

You can checnge the header text as shown in the code below:
c#:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) 
    { 
        if (e.Item is GridHeaderItem) 
        { 
            GridHeaderItem headerItem = (GridHeaderItem)e.Item; 
            headerItem.Cells[2].Text = "CustomHeader"
        } 
    } 

Thanks
Princy.
Tags
Grid
Asked by
G S S
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or