Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
395
Webdatagrid, Filtering and ObjectDatasource - Need URGENT help.
posted
I have a webdatagrid which gets bind by the select method of objectdatasource when I click the label.

My webdatagrid opens in a panel.

Look at the code below for the bind of grid.

ViewState["FromDay"] = FromDay;

ViewState["ToDay"] = ToDay;

gv.DataSourceID = objGV.ID;

gv.DataBind();

//get the total no of records gv.Behaviors.Paging.Enabled = false;

lblTotalCount.Text = HttpContext.Current.Session["TOTAL_CountROWS"].ToString();

// gv.Rows.Count.ToString();

gv.Behaviors.Paging.Enabled = true;

if (ViewState["LNK"] != null && ViewState["LNK"].ToString() == lnkbtn.ID)

{ row.Visible = !row.Visible; }



Now when I filter the webdatagrid and close the panel,and again click the label which binds the webdatagrid, the grid is not getting refreshed.

Please help.

I want to know how to refresh DatasourceID
gv.Behaviors.Filtering.ColumnFilters.Clear(); gv.Behaviors.Filtering.ColumnSettings.Clear(); gv.Behaviors.Filtering.ClearBehaviorColumnInfo();
These above clears the filters but still the grid is not refreshed.