Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7918411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T15:29:54+00:00 2026-06-03T15:29:54+00:00

I have this in grid settings: var gridLayoutRepository = new GridLayoutRepository(); settings.ClientLayout = (s,

  • 0

I have this in grid settings:

    var gridLayoutRepository = new GridLayoutRepository();

    settings.ClientLayout = (s, e) =>
    {
        Debug.Write(e.LayoutData);

        if (e.LayoutMode == ClientLayoutMode.Loading)
        {
            e.LayoutData = gridLayoutRepository.Load();
        }
        else
        {
            gridLayoutRepository.Save(e.LayoutData);
        }
    };

I want to have one button for saving gridstate in database and one button for resetting it. Can you help me?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T15:29:56+00:00Added an answer on June 3, 2026 at 3:29 pm

    This is possible this way. In grid settings must save grid state:

    settings.ClientLayout = (s, e) =>
        {
            if (e.LayoutMode == ClientLayoutMode.Loading)
            {
                if (Session["myGridState"] != null)
                    e.LayoutData = (string)Session["myGridState"];
            }
            else
                Session["myGridState"] = e.LayoutData;
        };
    

    Then on button click you should save grid state like this:

    <script type="text/javascript">
    function SaveLayoutData() {
        $.getJSON("@Url.Action("SaveLayoutData", "MyController" })", null,
            function (result) {
                if(result == 'success') {
                    alert("Layout save success");
                }
            });
    }
    </script>
    

    In Controller:

        public JsonResult SaveLayoutData()
        {
           _gridStateRepository.Save(Session["myGridState"]);
           return Json("success", JsonRequestBehavior.AllowGet);
        }
    

    When you are loading grid you should load grid state from database and write it in Session[“myGridState”]

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a paging grid and some function that load a new store to
I'm having a small problem. I have this grid with a column: <data:DataGrid ColumnHeaderStyle={StaticResource
I have this code right now to get the row value from jquery grid..
I have MyContainer User Control with Grid inside. Each cell of this Grid contains
So I have this Xaml inside a ListBox Item Template: <ListBox.ItemTemplate> <DataTemplate> <Grid Height=22
I have something like this in my xaml: <Grid> <Image Name=image Source=../../Images/DefaultImage.png HorizontalAlignment=Stretch VerticalAlignment=Stretch></Image>
I have grid something like this: Ext.define('Exp.view.dashboard.Tv', { extend: 'Ext.grid.Panel', initComponent: function() { this.columns
I have a Grid inside a Canvas defined like this: <Canvas x:Name=outerCanvas> <Grid Grid.Row=1
I have a grid in a XAML file in a WPF project. This MainGrid
I have a grid with over 5000 data records. This data keeps growing on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.