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 8594201
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T00:08:47+00:00 2026-06-12T00:08:47+00:00

This question is a part of my original post here Get Data Into Extjs

  • 0

This question is a part of my original post here Get Data Into Extjs GridPanel

Below is my Controller that reads data from sql db and then I am trying to encode the result as JSON and send the data back to my gridview.js

public JsonResult writeRecord()
//public string writeRecord()
    {

        Response.Write("Survey Completed!");
        SqlConnection conn = DBTools.GetDBConnection("ApplicationServices2");


        string sqlquery = "SELECT Q1, Q2, Q3, Q4, Improvements, Comments FROM myTable";
        SqlDataAdapter cmd = new SqlDataAdapter(sqlquery, conn);


        DataSet myData = new DataSet();
        cmd.Fill(myData, "myTable");

        conn.Open();
        conn.Close();

        return Json(myData, JsonRequestBehavior.AllowGet);
        //return myData.GetXml();

    } 

Here lies the problem,
with the above code, I get my gridview table with no data when executing gridview.js, but if I directly access my controller’s method like this

http://localhost:55099/GridView/writeRecord

I get this error,

A circular reference was detected while serializing an object of type ‘System.Globalization.CultureInfo’.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: A circular reference was detected while serializing an object of type ‘System.Globalization.CultureInfo’.

Can someone please help..

  • 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-12T00:08:48+00:00Added an answer on June 12, 2026 at 12:08 am

    I use the following tool for serializing and deserializing JSON:

    http://james.newtonking.com/pages/json-net.aspx

    It’s very easy to use and very lightweight.

    While serializing we use this option:

    JsonConvert.SerializeObject(myObject, Formatting.Indented, 
                                new JsonSerializerSettings { 
                                       ReferenceLoopHandling = ReferenceLoopHandling.Ignore 
                                })
    

    It ignores circular references.

    Also json.net from newtonking is extremely fast.

    The other options is to use DTO’s and map them via Automapper as mentioned by Diver.

    Edit: I suspect your store is wrong:

    var store = Ext.create('Ext.data.JsonStore', {      
            storeId: 'myData',
            reader: new Ext.data.JsonReader({
                root: 'myTable',
                fields: [{ name: 'Q1', type: 'int' },
                         { name: 'Q2', type: 'int' },
                         { name: 'Q3', type: 'int' },
                         { name: 'Q4', type: 'int' },
                         { name: 'Q5', type: 'int' },
                         { name: 'Improvements', type: 'string' },
                         { name: 'Comments', type: 'string'}]
            }),
    
            proxy: {
                 type: 'json',
                url: 'GridView/writeRecord'
            }    
    });  
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The first part of this question is now its own, here: Analyzing Text for
I have seen this question that talks about getting the last part of a
I am reposting this question due to inability to solve the problem (original here
This question is extended part of my previous question, Finding number position in string
Note: all the quotation marks in this question are actually part of the code.
This question has two parts. Part 1. Yesterday I had some code which would
The first part of this question is actually a request for confirmation based on
I was reading this question, but didn't understand some part of the aix's answer
This is a follow up of this question: Puzzle - How to 'colorify' part
This is two part question: I have two stored procedures: sp1 & sp2. If

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.