filter combobox data binding

1 posts, 0 answers
  1. Kod
    Kod avatar
    9 posts
    Member since:
    Oct 2017

    Posted 27 Nov Link to this post

    Hello,

    I am using below code block to bind filter combobox but the not able to bind data to combobox. can anyone help me in this?

     

    protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
           {
               if (e.Item is GridFilteringItem)
               {               
                   GridFilteringItem item = (GridFilteringItem)e.Item;
                   RadComboBox combo = (RadComboBox)item.FindControl("RadComboboxName");
                   combo.DataSource = Data(0,0).DefaultView.ToTable(true, "Name");
                   combo.DataTextField = "Name";
                   combo.DataValueField = "Name";
               }
           }
Back to Top