WebdataGrid y ObjectDatSource: después del evento filtrado

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.

Por favor, ayuda.

I want to know how to refresh DatasourceID

preguntado el 09 de marzo de 12 a las 14:03

Please provide more details on what you mean by "the grid is not getting refreshed". -

2 Respuestas

perhaps you can try ClearDataSource() method of the grid prior rebind, or just clear the grid's filter rules that have been applied through the Filtering Behavior already.

Hope it helps. Rado

Respondido 17 Abr '12, 08:04

Sure I would post the answer soon :) - Bebu

Assuming this creates a filter row, you end up with a row that does not exist in your datasource , your call stack will show you infagistics issues none of us want to get into . you can remove the filter row when the panel is closed , or make sure the filter row (if present) is not the active row when you load this grid.

contestado el 02 de mayo de 12 a las 17:05

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.