filtertemplate

2 posts, 0 answers
  1. Tina
    Tina avatar
    130 posts
    Member since:
    Jul 2011

    Posted 08 Dec 2011 Link to this post

    ?How to create filter template in radgrud dynamically
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 08 Dec 2011 Link to this post

    Hello Tina,

    Try the following code.
    C#:
    protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
    {
     if (e.Item is GridFilteringItem)
     {
       GridFilteringItem item = (GridFilteringItem)e.Item;
       TableCell cell = (TableCell)item["Country"];
       RadComboBox combo = new RadComboBox();
       combo.DataTextField = "Name";
       combo.DataValueField = "Name";
       combo.DataSourceID = "SqlDataSource1";
       cell.Controls.Add(combo);
     }
    }

    -Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top