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

2 posts, 0 answers
  1. G S S
    G S S avatar
    85 posts
    Member since:
    Mar 2008

    Posted 20 Jun 2009 Link to this post

    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
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 22 Jun 2009 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top