This is a migrated thread and some comments may be shown as answers.

Radgrid Not re-applying google like filter after postback

1 Answer 33 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Peter
Top achievements
Rank 1
Peter asked on 22 Aug 2012, 04:20 PM
hi

i wonder if you can help

i have set up a radgrid with the google style filtering as explained here google like filter
i have combined it with some other features , but for whatever reason now it wont re-apply the filter on postback and i dont know why it has the filter items in the boxes, but is just not filtering the table anymore.

can anyone help ?

the grid is defined as
<telerik:RadGrid ID="RadGrid1" runat="server" OnColumnCreating="RadGrid1_ColumnCreating"
            OnNeedDataSource="RadGrid1_NeedDataSource" OnRowDrop="RadGrid1_RowDrop"
            AllowPaging="true" AllowSorting="true" Width="99%" PageSize="5" AutoGenerateColumns="false"
            AllowFilteringByColumn="True" AllowMultiRowSelection="true" Skin="Black" EnableLinqExpressions="false">
            <MasterTableView AllowFilteringByColumn="true" PageSize="15" EditMode="InPlace" TableLayout="Auto" >
            </MasterTableView>
            <PagerStyle Mode="NextPrevAndNumeric" />
            <ClientSettings AllowRowsDragDrop="True" AllowColumnsReorder="false">
                <Selecting AllowRowSelect="True" EnableDragToSelectRows="false" />
            </ClientSettings>
        </telerik:RadGrid>

i have an ajax manager

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                    <telerik:AjaxUpdatedControl ControlID="point_selection" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

and the following events defined
protected void RadGrid1_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
{
    this.RadGrid1.DataSource = Classes.clsGlobal.FlowsData;
    this.RadGrid1.DataMember = Classes.clsGlobal.FlowsData.Tables[0].TableName;
}
 
protected void RadGrid1_ColumnCreating(object sender, GridColumnCreatingEventArgs e)
{
    if ((e.ColumnType == typeof(DailyFlowsFilter).Name))
    {
        e.Column = new DailyFlowsFilter();
    }
}
 
protected void RadGrid1_RowDrop(object sender, GridDragDropEventArgs e)
{
    IList<FlowItem> MyFlows = SelectedFlows;
 
    foreach (GridDataItem GD in e.DraggedItems)
    {
        FlowItem NewFlow = new FlowItem(GD["flow_item_name"].Text, GD["from_country"].Text, GD["to_country"].Text,
                                        GD["from_sys_op"].Text, GD["to_sys_op"].Text, GD["gas_type"].Text, GD["id"].Text,
                                        GD["source_id"].Text, GD["point_type"].Text, GD["source"].Text, GD["nominations"].Text, GD["flow_item_type"].Text);
        MyFlows.Add(NewFlow);
    }
 
    SelectedFlows = MyFlows;
    point_selection.Rebind();
}

please can you help

1 Answer, 1 is accepted

Sort by
0
Accepted
Kostadin
Telerik team
answered on 27 Aug 2012, 01:19 PM
Hello Peter,

Everything looks in order and I could not find anything wrong in your code declaration. I used your code and prepared a small example and attached it to this forum thread. Could you check it and let me know how it deffers from your real setup?

All the best,
Kostadin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Peter
Top achievements
Rank 1
Answers by
Kostadin
Telerik team
Share this question
or