You need to sets Grid attribute values again for make it work with footable plugin with the css.
Make one method and call it when you bind gridview and after your dropdown filter code.
Refer below code for your reference and implement it as per your code logic.
C#
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
DataTable dt = new DataTable();
dt.Columns.AddRange(new DataColumn[4] { new DataColumn("Id"), new DataColumn("Name"), new DataColumn("Country"), new DataColumn("Salary") });
dt.Rows.Add(1, "John Hammond", "United States", 70000);
dt.Rows.Add(2, "Mudassar Khan", "India", 40000);
dt.Rows.Add(3, "Suzanne Mathews", "France", 30000);
dt.Rows.Add(4, "Robert Schidner", "Russia", 50000);
GridView1.DataSource = dt;
GridView1.DataBind();
//Call Footable Attributes setting method after grid binding
SetFootableAttributes();
}
}
// Make Seprate method To sets Footable Attribute values to grid
private void SetFootableAttributes()
{
//Attribute to show the Plus Minus Button.
GridView1.HeaderRow.Cells[0].Attributes["data-class"] = "expand";
//Attribute to hide column in Phone.
GridView1.HeaderRow.Cells[2].Attributes["data-hide"] = "phone";
GridView1.HeaderRow.Cells[3].Attributes["data-hide"] = "phone";
//Adds THEAD and TBODY to GridView.
GridView1.HeaderRow.TableSection = TableRowSection.TableHeader;
}
protected void ddlFilter_SelectedIndexChanged(object sender, EventArgs e)
{
// 1. Your couuent code
// 2.Call Footable Attributes setting method again after filter
SetFootableAttributes();
}