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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T07:54:57+00:00 2026-06-18T07:54:57+00:00

I am trying to get values from a grid in my c# controller. This

  • 0

I am trying to get values from a grid in my c# controller. This is my store and grid

Ext.create('Ext.data.Store', {
    storeId:'store',
    fields:['name', 'email', 'phone'],
    proxy: {
        type: 'memory',
        reader: {
            type: 'json',
            root: 'items'
        }
     }
});

Ext.create('Ext.grid.Panel', {
    store: Ext.data.StoreManager.lookup('store'),
    columns: [
        { text: 'Name',  dataIndex: 'name' },
        { text: 'Email', dataIndex: 'email', flex: 1 },
        { text: 'Phone', dataIndex: 'phone' }
    ],
    height: 200,
    width: 400,
    renderTo: Ext.getBody()
});

This is how I am trying to pass my grid values to the controller

var records = [];
this.store.data.each(function(rec) {
     records.push(rec.data);
});
Ext.Ajax.request({
     url: 'mycontroller/read_grid',
     params: {
          par1: Ext.encode(records)
     }
})

my problem is how do I get all the values from column phone to update my sql database. Do i use some kind of array or is there a method to get all the values of column “phone” to store in database

  • 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-18T07:54:58+00:00Added an answer on June 18, 2026 at 7:54 am

    You are doing it the wrong way. First you should always have one [idProperty][1] property for a model and you should always use a model! Now if you don’t define a model the store will use implicit model and if you don’t have defined a idProperty it will be ‘id’ by default.

    Now let’s assume you have all this:
    If you then add or edit models instances (records) of that type that are bound to a store (added or loaded to it) you can submit all of them that were either changed (have dirty fields) or are new (are phantom) by calling sync() on the store. The proxy will need a appropriate writer for this. In you case you may configure the write with [allowSingle][2] set to false to force the writer to always send a array (list) of records back to the server otherwise you may struggle with deserialize errors on your controller.

    Your case sounds a bit uncommon cause if you just send the phone numbers how can you know which phone number belongs tho whom? Anyway if you do it like described above you have it the right way and you can still decide which fields you take on the server.

    Note: If you define a proxy on the model you don’t need to define the same
    again on the store.

    Update

    To fetch just one field type and send it you can do (untested)

    var emails = store.collect('email');
    Ext.Ajax.request({
        url: 'page.php',
        jsonData: emails,
        success: function(response){
            var text = response.responseText;
            // process server response here
        }
    });
    

    see collect & request for more information

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

Sidebar

Related Questions

I am trying to get values from a data set. My function has to
I am trying to get coordinates from GPS (this actually gives the values for
I'm trying to get values from nsdata class and doesn't work. here is my
I am trying to get the values from an HTML table row. When I
I am trying to get double values from file using fscanf function. I am
I'm trying to get the values from a pointer to a float array, but
I am trying to get the privacy values (from privacy table) for photos that
I'm trying to get the pixel rgb values from a 64 x 48 bit
I am trying to select three values from xml document. I want to get
I'm trying to create a grid of 10x10 images. These are loaded from javascript

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.