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

[Solved] Filters not Persisting

1 Answer 110 Views
Grid
This is a migrated thread and some comments may be shown as answers.
David Kucharski
Top achievements
Rank 1
David Kucharski asked on 13 May 2013, 05:12 PM
I have a RadGrid that I am create on Page_Init. I have EnableViewState and EnableColumnsViewState both set to true. I apply a filter on the grid, the system runs the NeedDataSource and the correct records are applied. The filter value is still in the textbox. I then apply a second filter to a different column. The system runs the NeedDataSource and records that only apply to the second filter show. The first filter is not applied and the value in the textbox of the first filter is erased. I don't believe this is the desired behaviour. What am I doing wrong?

RadGrid1.ID = "RadGrid1"
RadGrid1.Width = Unit.Pixel(1500)
RadGrid1.Height = Unit.Pixel(700)
RadGrid1.MasterTableView.EditMode = GridEditMode.InPlace
RadGrid1.EnableViewState = True
RadGrid1.AllowPaging = True
'RadGrid1.AllowCustomPaging = True
RadGrid1.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric
RadGrid1.AutoGenerateColumns = False
RadGrid1.ShowStatusBar = True
RadGrid1.AllowSorting = True
RadGrid1.AllowFilteringByColumn = True
RadGrid1.MasterTableView.NoDetailRecordsText = "No records could be found."
RadGrid1.MasterTableView.NoMasterRecordsText = "No records could be found."
RadGrid1.MasterTableView.ShowHeadersWhenNoRecords = True
RadGrid1.Skin = "WebBlue"
RadGrid1.ClientSettings.ClientEvents.OnGridCreated = "GetGridObject"
RadGrid1.ClientSettings.Scrolling.FrozenColumnsCount = 2
RadGrid1.ClientSettings.AllowColumnsReorder = True
RadGrid1.ClientSettings.ColumnsReorderMethod = GridClientSettings.GridColumnsReorderMethod.Swap
RadGrid1.ClientSettings.Selecting.AllowRowSelect = True
RadGrid1.ClientSettings.Resizing.AllowColumnResize = True
RadGrid1.ClientSettings.Scrolling.AllowScroll = True
RadGrid1.ClientSettings.Scrolling.UseStaticHeaders = True
RadGrid1.ClientSettings.Scrolling.SaveScrollPosition = True
RadGrid1.ClientSettings.ClientEvents.OnFilterMenuShowing = "filterMenuShowing"
RadGrid1.FilterMenu.OnClientShowing = "MenuShowing"
RadGrid1.MasterTableView.EnableViewState = True
RadGrid1.MasterTableView.EnableColumnsViewState = True
RadGrid1.MasterTableView.PageSize = 50
RadGrid1.MasterTableView.AllowMultiColumnSorting = True
RadGrid1.MasterTableView.DataKeyNames = New String() {"DetailID", "Day", "FoundGeographies", "SubZipCount"}
If mSubCodesAvailable Then
    RadGrid1.MasterTableView.HierarchyLoadMode = GridChildLoadMode.ServerBind
    RadGrid1.MasterTableView.HierarchyDefaultExpanded = True
End If

1 Answer, 1 is accepted

Sort by
0
David Kucharski
Top achievements
Rank 1
answered on 13 May 2013, 07:46 PM
On the line in my aspx page I had EnableViewState=false. Once I changed it, all good.

<asp:PlaceHolder EnableViewState="true" ID="PlaceHolder1" runat="server" />
Tags
Grid
Asked by
David Kucharski
Top achievements
Rank 1
Answers by
David Kucharski
Top achievements
Rank 1
Share this question
or