1. #1
    Ext User
    Join Date
    Feb 2009
    Posts
    7
    Vote Rating
    0
    gangxu is on a distinguished road

      0  

    Default How to tell the value has been updated in PropertyGrid

    How to tell the value has been updated in PropertyGrid


    How can I tell the values in PropertyGrid have been updated?

    My propertyGrid is loaded in my code like this:

    var rec = new Grid.PropertyRecord({
    name: 'abc',
    value: '123'
    });
    propertyPanel.store.add(rec);

    After I change the value, both propertyPanel.store.getAt(0).dirty and propertyPanel.store.isModified('abc') still returns false.

    I added propertyPanel.store.commitChanges(); before I query dirty and isModified. Still returns false here.

    Is there an easy way to tell the value has been modified? Or do I use PropertyPanel wrong?

    TIA!
    Gang

  2. #2
    Ext User
    Join Date
    Jul 2007
    Location
    Florida
    Posts
    9,996
    Vote Rating
    5
    mjlecomte will become famous soon enough mjlecomte will become famous soon enough

      0  

    Default


    Post some code that makes sense. What is propertyPanel?

    Post a working showcase

    http://extjs.com/learn/Ext_Forum_Hel...rking_showcase

  3. #3
    Ext User
    Join Date
    Feb 2009
    Posts
    7
    Vote Rating
    0
    gangxu is on a distinguished road

      0  

    Default


    Sorry, I really mean PropertyGrid, not PropertyPanel. Newbie here.

    Here is a simple code I have here.
    Attached Files

  4. #4
    Ext User
    Join Date
    Jul 2007
    Location
    Florida
    Posts
    9,996
    Vote Rating
    5
    mjlecomte will become famous soon enough mjlecomte will become famous soon enough

      0  

    Default


    Just paste the code inside code tags please, don't attach.

  5. #5
    Ext User
    Join Date
    Feb 2009
    Posts
    7
    Vote Rating
    0
    gangxu is on a distinguished road

      0  

    Default


    Here it is. Sorry about it.

    The code shows how the PropertyGrid is populated. When the values are updated, is there an easy way to tell?

    Code:
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
            <title id='title'>Title</title>
     
            <!-- ** CSS ** -->
            <!-- base library -->
            <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
     
            <!-- overrides to base library -->
     
     
            <!-- ** Javascript ** -->
            <!-- base library -->
            <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
            <script type="text/javascript" src="../../ext-all-debug.js"></script>
     
     
            <!-- overrides to base library -->
     
            <!-- extensions -->
     
            <!-- page specific -->
     
            <script type="text/javascript">
            Ext.BLANK_IMAGE_URL = '../../resources/images/default/s.gif';
     
            Ext.onReady(function(){
     
                //your onReady code here 
            var propPanel = new Ext.grid.PropertyGrid({
            id: 'prop_grid',
            title: 'Setting Grid',
            margins: '5 5 5 1',
            stripeRows: true,
            renderTo: 'grid-example',
            width: 400,
            height: 300,
            source: {}
            });
    
            // Disable sorting of the propertyGrid
            propPanel.getColumnModel().setConfig([
            {header: 'Attribute', sortable: false, dataIndex: 'name', id:'name'},
            {header: 'Value', sortable: false, dataIndex: 'value', id:'value'}
            ]);
    
            var rec = new Ext.grid.PropertyRecord({
            name: 'Field1',
            value: '123'
            });
            propPanel.store.add(rec);
        
            rec = new Ext.grid.PropertyRecord({
            name: 'Field2',
            value: '456'
            });
            propPanel.store.add(rec);
    
            }); //end onReady
            </script>
     
        </head>
        <body>
        <div id="grid-example"></div>
        </body>
    </html>

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."