Using a WebDataGrid and ExcelStyle filtering... version 15.2
I am having an issue between filtering and paging. I have a couple of scenarios that should work but I can't get them to work with the same configuration.
The issue when my WDG is configured as such....
Working with a grid that's 3 pages...
I can filter to a 2 page dataset... paging works, clear filter works.
When I filter to a 1 page dataset, there is no paging (correct), but when I clear filter, it returns to the full dataset, but the paging does not return (should be 3 pages as it is on page load).
So I reconfigure my WDG settings as such...
Using the same 3 page grid/dataset...
I filter to the 1 page dataset
No paging (correct) and when I clear filters it goes back to the full dataset (3 pages worth) and the paging buttons return.
When I filter to the 2 page dataset..
Filter works, but clicking on page 2 restores the grid to the full dataset (3 pages worth) instead of page 2 of the filtered dataset.
I need both of these scenarios to work but I can't figure out the WDG configuration required.
Thank you for the information shared, though it is not enough to make assumptions on the issue. An important role in the grid behavior would be how you bind the grid - keeping enableDataViewState to false requires that you bind the grid on each postback - please make sure you follow this.
Furthermore, setting enableViewState to true is not a recommended approach as this feature is known to result in misbehaviors in many situations. A lot of bugs have been fixed though, and what you experience in 15.2 is pretty probable to be working fine in 18.1.
ExcelStyleFiltering in combination with enableDataViewState to true is also a combination that is not recommended. We always recommend users to turn off those features or use them only if they are sure what they want to achieve.
I could be able to help you if you provide me with a sample that I can run on my side and investigate. If there is a bad configuration of the grid I would be able to help you with that, but if it is a bug in our code that leads to those results, then you would need to upgrade to a newer version of our product as 15.2 support has expired.
Looking forward to hearing from you.
Hi Hristo, thanks for the response.
The grid is bound on each postback.
Here is the grid control:
<ig:WebDataGrid ID="wgAdminTables" runat="server" AutoGenerateColumns="true" ClientEvents- AJAXResponse="grid_Response" OnRowDeleted="wgAdminTables_RowDeleted" OnDataFiltered="wgAdminTables_DataFiltered" OnRowUpdating="wgAdminTables_RowUpdating" OnRowsDeleting="wgAdminTables_RowsDeleting" OnRowAdding="wgAdminTables_RowAdding" OnDataFiltering="wgAdminTables_DataFiltering" OnRowUpdated="wgAdminTables_RowUpdated" OnRowAdded="wgAdminTables_RowAdded" AjaxIndicator-BlockArea="Control" OnPageIndexChanged="wgAdminTables_PageIndexChanged" OnColumnSorted="wgAdminTables_ColumnSorted" EnableViewState="false" EnableDataViewState="false" EnableAjax="true" EnableAjaxViewState="true">
<Behaviors> <ig:Activation Enabled="true" ActiveRowCssClass="selectmode"></ig:Activation> <ig:Selection RowSelectType="Single" CellClickAction="Row" Enabled="true" SelectedRowSelectorCssClass="selectmode"></ig:Selection>
<ig:EditingCore> <Behaviors> <ig:CellEditing EditCellCssClass="editmode" EditModeActions-MouseClick="Double" CellEditingClientEvents-ExitedEditMode="grid_DoUpdate" Enabled="true"></ig:CellEditing> <ig:RowAdding Alignment="Bottom" EditModeActions-MouseClick="Single" Enabled="true" AddNewRowCssClass="addnew"></ig:RowAdding> <ig:RowDeleting Enabled="true" ShowDeleteButton="true"></ig:RowDeleting> <%--<ig:RowEditing Enabled="true" EditCellCssClass="editmode" EnableDialog="true" RowEditingClientEvents-ExitedEditMode="grid_UpdateWarning"></ig:RowEditing>--%> </Behaviors> </ig:EditingCore>
<ig:RowSelectors Enabled="true"></ig:RowSelectors> <ig:Paging PagerAppearance="Bottom" QuickPages="5" PageSize="20" Enabled="true" PagerMode="NumericFirstLast"></ig:Paging> <ig:Sorting SortingMode="Single" Enabled="true"></ig:Sorting> <ig:Filtering Enabled="true" EditModeActions-MouseClick="Single" FilterType="RowFilter" EnableInheritance="true"></ig:Filtering> </Behaviors> </ig:WebDataGrid>
The grid is bound in code behind (on every postback). The row adding, edting, and deleting is handled in code behind.
The grid is also bound again in code behind for the filtering event:
Dim ds As DataSet = CType(wgAdminTables.DataSource, DataSet) Dim dt As DataTable = ds.Tables(0)
For Each colFilter As Infragistics.Web.UI.GridControls.ColumnFilter In e.ColumnFilters dt.Select(colFilter.Condition.GetFilterRuleString(colFilter.ColumnKey)) Next
wgAdminTables.DataSource = dt wgAdminTables.DataBind()
Let me know if you need any other info.
Thank you for the configuration shared.
I see some differences in the behavior between 15.2 and 18.1 and between RowFilter and ExcelStyleFilter, Please confirm if I should be investigating RowFilter or ExcelStyleFilter. I will soon publish more results from my investigation.
My apologies... it is set for RowFilter.
Any ideas on this? I downloaded the latest 18.1 release and the issue persists.