ie: Similar to what DevExpress provides: http://www.devexpress.com/Help/?document=ASPxGridView/CustomDocument4342.htm&levelup=true
I found a code sample on your help site which seems to provide a sample piece of code for this (http://www.telerik.com/help/aspnet-ajax/grdsavingsettingsonperuserbasis.html) but the code does not compile. (Haven't really dug into why...)
Thanks,
Roy
13 Answers, 1 is accepted
Did you happen to take a look at the following code library? If not, try downloading the sample application in the following code library which demonstrates on saving grid settings:
Storing Multiple Grid settings in Database via Profile
Hope this helps..
Princy.
Thanks for the feedback.
This example *almost* works. It correctly captures (and re-applies) sorting, filtering, etc...However the one thing that it doesn't do is re-display the filter criteria when AllowFilteringByColumn="True"
ie:
1. The user manually enters a filter criteria with the auto-filter row (ie: Name column STARTSWITH "A").
2. The grid is correctly filtered
3. They navigate to another page (and I use the GridSettings helper to persist the layout)
4. They navigate back to the page with the grid (and I use the GridSettings helper to re-apply the layout)
At this point, the grid is still correctly filtered, but all the auto-filter text boxes are blank, making it confusing for the user as there is no indication that a filter is in place.
Any suggestions? I notice this sample is based on an older version of the RadGrid - is there a more up to date sample?
Thanks,
Roy
Veli
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
public override string ToString()
{
LosFormatter formatter = new LosFormatter();
StringWriter writer = new StringWriter();
formatter.Serialize(writer, this);
return writer.ToString();
}
To this:
public override string ToString()
{
LosFormatter formatter = new LosFormatter();
using (StringWriter writer = new StringWriter())
{
formatter.Serialize(writer, this);
return writer.ToString();
}
}
Apart from that, so far so good...
Cheers,
Veli
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Is there a way or a simple attribute in the RadGrid to turn on/off saving (in the session/cookies) all the customizations(sort order/column, page no, filter, reorder, resize) instead of a control trigger saving explicitly. It would be a great thing to have. May be like AutoSaveGridSettings="True" in the below:
<telerik:RadGrid ID="rgUserGroups" runat="server" AutoSaveGridSettings="True" AllowPaging="True" AllowSorting="True"
AutoGenerateColumns="False" OnNeedDataSource="rgUserGroups_NeedDataSource"
AllowFilteringByColumn="true" Skin="Silk" PageSize="10" HeaderStyle-Font-Bold="true"
AlternatingItemStyle-BackColor="#f0f0f0" ClientSettings-Resizing-ShowRowIndicatorColumn="false">
If you are using RadPersistenceManager control you can easily save the grid settings by calling SaveState method. Identically you can load the state any time by calling LoadState method. You can call those method on each operation or only when requires the state to be saved/loaded.
Regards,
Kostadin
Telerik
Thanks Kostadin, I understand that. Though what I need would be a setting/attribute that simply turns on/off saving grid settings. Means I do not want to call SaveState and LoadState methods. These operations (sort/page change/filter columns/rearrange columns/resize columns) I do in the grid on the page it should remember that (may be in session or cookies) and when I revisited the page it should load that state (if there is any customization).
With that setting/attribute set to "On", Saving and Loading happens implicitly instead of explicit call to any such methods.
I hope this scenario is clear. I'm not sure if this impractical.
Hello Team,
Please can you suggest something.
Thanks
Kamal
I am afraid that this functionality will not be included in the grid. Nevertheless you can create a custom control which inherits RadGrid and add such property. You should note that you can hook OnItemCommand and save the state there in case you need to save it after each operation.
Regards,
Kostadin
Telerik