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

add button into footer template in detailtable

1 Answer 205 Views
Grid
This is a migrated thread and some comments may be shown as answers.
sf
Top achievements
Rank 1
sf asked on 15 Apr 2010, 10:26 AM
My radgrid has three levels. When I expand through to the bottom level detailtable I want to add a button in the footer area of the GridTableView to perform some tasks that use the 3rd level data. Is this possible? thanks in advance

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 16 Apr 2010, 06:18 AM
Hello,

You can add button in the footer area of the GridTableView by creating it in the ItemCreated event of RadGrid. Sample code is given below for your reference.


protected
 void RadGrid1_ItemCreated(object sender, GridItemEventArgs e) 
    { 
        if (e.Item is GridFooterItem && e.Item.OwnerTableView.Name == "EmployeeTerritories"
        { 
            GridFooterItem footerItem = (GridFooterItem)e.Item; 
            Button btn = new Button(); 
            btn.Text = "Button"
            btn.CommandName = "btnFooter"
            footerItem.Cells[2].Controls.Add(btn); 
        } 
    } 

Regards,
Shinu.






Tags
Grid
Asked by
sf
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or