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

Filter in RadGrid needs a full page postback?

7 Answers 297 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Esperanza Ramos
Top achievements
Rank 1
Esperanza Ramos asked on 14 Jul 2008, 07:21 PM
Hi, All:

I am using vs 2005.  I add some rows asynchroniously(using Ajax) into
Rad Grid, with filtering enable. But it failed.

To fix this bug, I remove some Ajax capabilities, enabling a full page
postback when adding rows into Rad Grid.  Then, Rad Grid's filtering
works.

Does Rad Grid filtering need a full page postback before filters work?

Thanks.

Stanley

7 Answers, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 15 Jul 2008, 03:04 PM
Hello Stanley,

RadGrid does not require full postback for its filtering to work. You can verify this in the following online demo:

Basic grid filtering

The problem most probably lies in RadGrid's definition and initialization. Could you, please, provide some code samples for us to look at?

Regards,
Veli
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Esperanza Ramos
Top achievements
Rank 1
answered on 16 Jul 2008, 01:34 PM
Hi, Telerik Team:

as you request, here is my code for RadGrid.  I am using VS 2005.

<rad:RadAjaxPanel ID="rapGrid" runat="server" Height="20px" Width="850px" LoadingPanelID="alpLoading" >
<rad:RadGrid ID="rgJobInv" runat="server" AllowFilteringByColumn="false" AllowPaging="True" AllowSorting="True"
GridLines="None" AutoGenerateColumns="false" Width="100%" AllowAutomaticUpdates="true" AllowAutomaticDeletes="true"
AllowMultiRowSelection="true" AllowMultiRowEdit="true" OnItemCommand="rgJobInv_ItemCommand"
SelectedItemStyle-BackColor="navy" SelectedItemStyle-ForeColor="white">
<ClientSettings AllowDragToGroup="false">
<Selecting AllowRowSelect="true" />
</ClientSettings>

<MasterTableView AutoGenerateColumns="false" DataKeyNames="JobsID" EditMode="InPlace" AllowAutomaticDeletes="true"
AllowAutomaticUpdates="true" Width="100%" PageSize="30" PagerStyle-Mode="NextPrevAndNumeric" AllowSorting="true"
AlternatingItemStyle-BackColor="#ffffd9" CommandItemDisplay="Bottom">

Please help. 
Thank you.

Stanley Huang

0
Esperanza Ramos
Top achievements
Rank 1
answered on 16 Jul 2008, 06:27 PM
Hi, Telerik Team:

I would like to add:  I allow my Web app users to toggle RadGrid filtering:

protected void btnToggleFilters_Click(object sender, EventArgs e)
{
    if (rgJobInv.AllowFilteringByColumn == true)
    {
        rgJobInv.AllowFilteringByColumn =
false;
        rgJobInv.MasterTableView.AllowFilteringByColumn =
false;
    }
    else
    {
        rgJobInv.AllowFilteringByColumn =
true;
        ...
    }

I think, users toggle the filtering on and off, that makes the RadGrid to require
a full page postback, for filtering to work.

Thank you for your help.



Stanley Huang

0
Sebastian
Telerik team
answered on 17 Jul 2008, 06:36 AM
Hello Stanley,

As illustrates in the online demo linked by my colleague Veli, you can toggle the visibility of the grid filter item using the showFilterItem()/hideFilterItem() methods from the client-side API (see the radio buttons at the top of the page). Hence you do not need to perform postback or ajax request in order to perform the requested action.

Best regards,
Stephen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Chris Ruegsegger
Top achievements
Rank 1
answered on 24 Sep 2008, 05:10 PM
Stanley/Telerik,

The code that Stanley provided did work up until the most recent release.  I am using something exactly like it in my some of my projects.  Since upgrading to 2008.2 826, the filtering on all my grids using the previous code is broken.  I get errors in the MicrosoftAjax.js about a missing object.

Chris
0
Sebastian
Telerik team
answered on 25 Sep 2008, 07:24 AM
Hello Chris,

Do you use RadScriptManager on the page with the grid? If so, can the reason for it be the one discussed in this public forum thread? I suggest you test the custom build attached to the forum post and let us know whether it helps.

Best regards,
Stephen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Chris Ruegsegger
Top achievements
Rank 1
answered on 25 Sep 2008, 02:02 PM
Stephen,

That is the problem I am experiencing.  I requested and received a dev build that fixes the problem.  Thanks.

Chris
Tags
Grid
Asked by
Esperanza Ramos
Top achievements
Rank 1
Answers by
Veli
Telerik team
Esperanza Ramos
Top achievements
Rank 1
Sebastian
Telerik team
Chris Ruegsegger
Top achievements
Rank 1
Share this question
or