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

Add RAD Combo Boxes at the End of the Grid

1 Answer 16 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Babu
Top achievements
Rank 1
Babu asked on 06 Feb 2015, 08:06 PM
Hi,
I have a Rad Grid which gets its data displayed from OnNeedDataSource with 4 Columns and has pagesize=20 - Total Ouput is around 120 Rows
On Each Page after 20 Row are displayed i would like to add 4 RADCombo Boxes with Unique values of the columns displayed above and before the pager controls gets displayed like NextPage and Before etc

Do i need to use Footer Template and wher eshall i bind data to these Rad Combo Boxes - ItemCreated or ItemData Bound

Thanks


1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 11 Feb 2015, 09:46 AM
Hi Babu,

Since there is no footer template in RadGrid, you can set the ShowFooter property of the grid to true and handle the OnItemCreated event, where you can get reference to the GridFooterItem and add RadComboBox controls within the cells of the footer:
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
{
    if (e.Item is GridFooterItem)
    {
        GridFooterItem footer = e.Item as GridFooterItem;
        for (int i = 2; i < footer.Cells.Count; i++)
        {
            TableCell cell = footer.Cells[i];
            RadComboBox combo = new RadComboBox();
            cell.Controls.Add(combo);
        }
    }
}

For providing the data, you will have to handle the server-side OnPreRender event of the grid, get reference to each of the RadComboBox controls and manually provide the data to the control.


Best Regards,
Konstantin Dikov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
ComboBox
Asked by
Babu
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or