Hello
I'm using a GridView in Custom Binding mode and I'd like to use the SettingsCookies functionnalities. The display order of the columns works well, however I'm not able to make filteri
I assume that I must manually filter and sort the data I display and select the right rows according to the page index stored in the cookie when opening the page for the second time, but I don't know how to get the data from the cookie. Is there a way to read the data stored in the cookie?
Thanks
UPDATED:
Hello
Sorry for my previous incomplete post.
What I meant is that I've configured the gridview to use a cookie to save the column position, width, the filtering, the sorting and the paging :
C#settings.SettingsCookies.Enabled = true;
settings.SettingsCookies.CookiesID = settings.Name;
settings.SettingsCookies.StoreColumnsVisiblePosition = true;
settings.SettingsCookies.StoreColumnsWidth = true;
settings.SettingsCookies.StoreFiltering = true;
settings.SettingsCookies.StoreGroupingAndSorting = true;
settings.SettingsCookies.StorePaging = true;
I'd like to note that it works well in standard databinding mode.
Here are the steps to reproduce my problem :
I start my project and display the gridview page. I change the column positions, order by a column and apply a filter.
I close the page, restart my project and display the gridview page again :
- The column positions are the same as before closing the page (it works well for this part)
- The header of the column that I chose to sort my row displays that rows are sorted. However rows are not sorted (they appear in the same order that they are when no sorting is done)
- The filter I used is neither shown nor applied
Now if I delete the cookies, and restart my project, the gridview is back to its original state.
I go on the second page and close the page. I restart my project and go on the gridview page :
- The gridview is positionned on the second page which is what I wanted. However only empty rows are displayed.
My guess is that, as I am using custom databinding, I must manually select the right page, sort and filter data when this is automatically done by the gridview in standard databinding. Therefore, I'd like to know how to read the information stored in the cookie when I load the gridview and its data to be able to select the right page and apply filters and sorting.
I've attached my project to this post. The zip file contains a backup
of the database I use. You can restore it on a SQLServer server.
You can configure the connection string to the database in the nhibernate.config file on line 13.
Thanks!
Hello Kévin,
I would like to note that a cookie should contain information on filter criteria applied to the ASPxGridView. If this condition is not satisfied in your case, please send us a simple running project so that we can examine the issue on our side.
Hello,
I have updated your initial post with the detailed information you provided. We will examine your sample project and reply as soon as any results are available.
P.S. If you want to post a new update to a ticket, please create a corresponding Comment (not a Solution):
SC2 FAQ
Hi Kevin,
I have reproduce the issue on my side. We need additional time to investigate it. We will inform you once we have any results.