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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:36:55+00:00 2026-05-25T18:36:55+00:00

I follow instruction in writer to create grid with CRUD ability, but the problem

  • 0

I follow instruction in writer to create grid with CRUD ability, but the problem is when I edit existing row and save() it recognize that dirty row as create, I think the problem may lie in my idProperty as in link, but can’t figure out how.

Here is my code

Column model

var xsmWin = new Ext.grid.CheckboxSelectionModel({checkOnly:true});
var xcmWin = new Ext.grid.ColumnModel([
    xsmWin,
                new Ext.grid.RowNumberer(),
                {header: 'id', dataIndex: 'finCol0', align: 'left', hidden: true, hideable: false, sortable: false, width: 70},
                {header: 'column name', dataIndex: 'finCol2', align: 'left', hidden: false, hideable: false, sortable: true, width: 100, editor: new samart.form.xTextField({allowBlank: false})},
                {header: 'input type', dataIndex: 'finCol3', align: 'left', hidden: false, hideable: false, sortable: true, width: 100},
                {header: 'approve', dataIndex: 'approveFlag', align: 'center', hidden: false, hideable: false, sortable: true, width: 50},
               ]); 

Proxy

var proxyWin = new Ext.data.HttpProxy({
            api : {
                read : {
                    url     : SERVLET_URL + '&action=loadInnerDataGrid',
                    method: 'POST' 
                },
                create : {
                    url     : SERVLET_URL + '&action=createInnerData',
                    method: 'POST' 
                },
                update : {
                    url     : SERVLET_URL + '&action=updateInnerData',
                    method: 'POST' 
                },
                destroy : {
                    url     : SERVLET_URL + '&action=destroyInnerData',
                    method: 'POST' 
                }
            }
        });

Reader and Writer

var writerWin = new Ext.data.JsonWriter({
            encode: true,
            writeAllFields: false
        });
        var readerWin = new Ext.data.JsonReader(
            { 
                idProperty: 'finCol0',
              root: 'data'

            },[
                {name: 'finCol0',mapping:'fundHeadSeq'},
                //{name: 'finCol1',mapping:'fundType'},
                {name: 'finCol2',mapping:'headLabel'},
                {name: 'finCol3',mapping:'objectName'},
                {name: 'approveFlag',convert: function(v, record){
                    if (record.approveFlag == 'Y') {
                        return 'Yes';
                    } else if (record.approveFlag == 'N') {
                        return 'No';
                    }
                }},
            ]
        )

Store

var xstoreWin = new Ext.ux.data.PagingStore({

            storeId : 'xstoreWin',
             proxy   : proxyWin,
             reader  : readerWin,
             writer : writerWin,
             autoSave : false,
             autoLoad : true

        });
  • 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-05-25T18:36:55+00:00Added an answer on May 25, 2026 at 6:36 pm

    I have change

    idProperty : 'finCol0' to idProperty : 'fundHeadSeq'
    

    and

     {name: 'finCol0',mapping:'fundHeadSeq'}, to {name: 'fundHeadSeq',mapping:'fundHeadSeq'},
    

    in JSONWriter and change

    {header: 'id', dataIndex: 'finCol0', align: 'left', hidden: true, hideable: false, sortable: false, width: 70},
    to
    {header: 'id', dataIndex: 'fundHeadSeq', align: 'left', hidden: true, hideable: false, sortable: false, width: 70},
    

    in column model and everything work as expected.

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

Sidebar

Related Questions

If there is an easy to follow instruction or tutorial that I can use
I think i follow instruction from this site very carefully http://source.android.com/source/downloading.html but when i
I follow this instruction to add bouncycastle: http://www.bouncycastle.org/wiki/display/JA1/Provider+Installation but I have still one problem.
I'm trying to follow the instructions on Creating an IQueryable LINQ Provider , but
I'm trying to follow the instructions located at How-To Create a Hello World Snap-in
Follow up to this question for Facebook Friends.getAppUsers using Graph API that pulls friends
I follow this rule but some of my colleagues disagree with it and argue
I'm trying to create a instruction list using ordered lists (ol). Inside I want
I installed my Eclipse via the Ubuntu Software Center. Afterwhich, I follow the instruction
install leiningen by download the script and follow the github instruction. On a Ubuntu/Linux

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.