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

Toggle Button in RAD Grid

1 Answer 116 Views
Grid
This is a migrated thread and some comments may be shown as answers.
ajmal
Top achievements
Rank 1
ajmal asked on 15 Jul 2010, 12:00 PM
Hello,

I need to put a toggle button in either GRID header OR footer area, how this can acheive. Is there any way to put a button in grid footer area.

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 15 Jul 2010, 12:10 PM
Hello,

It is possible to access the GridFooterItem in code behind and add the control to the cell. Create the control in ItemCreated event and attach to footer item.

C#:
protected void RadGrid1_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)
{
    if (e.Item is GridFooterItem)
    {
        GridFooterItem footerItem = (GridFooterItem)e.Item;
        Label lbl = new Label();
        lbl.Text = "Hai";
        footerItem["CustomerID"].Controls.Add(lbl);
    }
}


-Shinu.
Tags
Grid
Asked by
ajmal
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or