Hi there,
I am following the code from the link below. It is great. However, there are two questions that I would like to ask.
http://www.telerik.com/community/code-library/preview-thread/aspnet-ajax/grid/storing-multiple-grid-settings-in-database-via-profile.aspx
1. When I turn on AllowFilterByColumn, it works fine when I re-login. However, it does not display the value in the filter TextBox or CheckBox. For example, I put "Net 60 Days" in the filter TextBox and select "Contains". After I re-login, I see the same result, but I don't see the text "Net 60 Days" inside the filter TextBox.
2. The column reorder and sorting seem to work fine, but not for paging. How do I accomplish that?
Thank you,
Sompop
This is a profile section in my web.config.
<profile enabled="true" defaultProvider="MyProfileProvider">
<providers>
<add name="MyProfileProvider" connectionStringName="myConnectionString" applicationName="/" type="System.Web.Profile.SqlProfileProvider"/>
</providers>
<properties>
<add name="GridAssetSettings" allowAnonymous="false" type="GridAssetSettings" serializeAs="Binary"/>
In .cs of the page where there is a RadGrid
protected override void Render(HtmlTextWriter writer)
{
base.Render(writer);
GridAssetSettings gas = new GridAssetSettings();
gas.SaveGridAssetSettingsNames(RadGridSaveGridSettingsUserBase, "RadGridSaveGridSettingsUserBase");
Context.Profile.SetPropertyValue("GridAssetSettings", gas);
}
protected void Page_Init(object sender, EventArgs e)
{
if (Context.Profile.GetPropertyValue("GridAssetSettings") != null)
{
GridAssetSettings gas = (GridAssetSettings)Context.Profile.GetPropertyValue("GridAssetSettings");
if (gas.Names.ContainsKey("RadGridSaveGridSettingsUserBase"))
{
GridSettings settings = new GridSettings(RadGridSaveGridSettingsUserBase);
settings.LoadSettings(gas.Names["RadGridSaveGridSettingsUserBase"].ToString());
}
}
}
}
I am following the code from the link below. It is great. However, there are two questions that I would like to ask.
http://www.telerik.com/community/code-library/preview-thread/aspnet-ajax/grid/storing-multiple-grid-settings-in-database-via-profile.aspx
1. When I turn on AllowFilterByColumn, it works fine when I re-login. However, it does not display the value in the filter TextBox or CheckBox. For example, I put "Net 60 Days" in the filter TextBox and select "Contains". After I re-login, I see the same result, but I don't see the text "Net 60 Days" inside the filter TextBox.
2. The column reorder and sorting seem to work fine, but not for paging. How do I accomplish that?
Thank you,
Sompop
This is a profile section in my web.config.
<profile enabled="true" defaultProvider="MyProfileProvider">
<providers>
<add name="MyProfileProvider" connectionStringName="myConnectionString" applicationName="/" type="System.Web.Profile.SqlProfileProvider"/>
</providers>
<properties>
<add name="GridAssetSettings" allowAnonymous="false" type="GridAssetSettings" serializeAs="Binary"/>
</properties>
</profile>
</profile>
In .cs of the page where there is a RadGrid
protected override void Render(HtmlTextWriter writer)
{
base.Render(writer);
GridAssetSettings gas = new GridAssetSettings();
gas.SaveGridAssetSettingsNames(RadGridSaveGridSettingsUserBase, "RadGridSaveGridSettingsUserBase");
Context.Profile.SetPropertyValue("GridAssetSettings", gas);
}
protected void Page_Init(object sender, EventArgs e)
{
if (Context.Profile.GetPropertyValue("GridAssetSettings") != null)
{
GridAssetSettings gas = (GridAssetSettings)Context.Profile.GetPropertyValue("GridAssetSettings");
if (gas.Names.ContainsKey("RadGridSaveGridSettingsUserBase"))
{
GridSettings settings = new GridSettings(RadGridSaveGridSettingsUserBase);
settings.LoadSettings(gas.Names["RadGridSaveGridSettingsUserBase"].ToString());
}
}
}
}