1. #1
    Ext User
    Join Date
    Mar 2007
    Posts
    17
    Vote Rating
    0
    rqmedes is on a distinguished road

      0  

    Default PropertyGrid

    PropertyGrid


    HI All,

    I have been playing with the property grid, and trying to change the default edit types with no success, i have looked at exmple code and played around in the source and am a bit stuck so was hopeing someone could point me in the correct direction.
    here is basic example to look at.


    Code:
     
    var propsGrid = new Ext.grid.PropertyGrid('props-panel');
     propsGrid.setSource({
              "Name": "Test",
              "Title" : "Test",
              "Tested": false,
              "Startdate": new Date(Date.parse('01/01/2007'))
    });
    propsGrid.render();

    The Date editor works fine . any old examples i have found a seem to handle the boolean and other data types passed from setSource() natively but i cannot seem to get them to work in 1.0 Alpha. Is this functionality still available?

    I have also unsuccesfully tried to get customEditors working, and was hoping someone could post a snippet of example code that works in Alpa 1

    Regards,

  2. #2
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854
    Vote Rating
    2
    tryanDLS is on a distinguished road

      0  

    Default


    The example edit-grid does custom editors and it is working. If you're still on alpha1, you need to updrade to the latest alpha3 rev.

  3. #3
    Ext User
    Join Date
    Mar 2007
    Posts
    17
    Vote Rating
    0
    rqmedes is on a distinguished road

      0  

    Default


    I have no problems with an editor gird, its when i am using the properties grid,
    I have tried setting up column models and tried adding custom editors. But I don't get any errors,

    just the field not showing in the grid, it looks like the data type passed through will control the editor as in setSource passing through a date, but i am unable to get any otf the other editors to work, and was hoping for a code snipped example for the propertyGrid.

  4. #4
    Developer... jon.whitcraft's Avatar
    Join Date
    Mar 2007
    Posts
    391
    Vote Rating
    0
    jon.whitcraft is on a distinguished road

      0  

    Default


    Quote Originally Posted by rqmedes
    I have tried setting up column models and tried adding custom editors. But I don't get any errors,
    if you have firebug installed wrap your code that you think is the problem in a try {} catch(e) {}

    like this

    Code:
    try {
      // your code here
    } catch(e) { console.warn(e) }
    this will out put any JS errors that might not bubble up becuase of the way JS debugging works in FF and with FireBug
    Jon
    Lead Internal Application Engineer - SugarCRM
    h2ik.co

  5. #5
    Ext User
    Join Date
    Mar 2007
    Posts
    7
    Vote Rating
    0
    xsokev is on a distinguished road

      0  

    Default


    Check out this post. It helped me.

    http://www.yui-ext.com/forum/viewtopic.php?t=3944

  6. #6
    Sencha User MD's Avatar
    Join Date
    Mar 2007
    Posts
    178
    Vote Rating
    0
    MD is on a distinguished road

      0  

    Default


    The link is broken, do you recall what post it was?

  7. #7

  8. #8
    Sencha User MD's Avatar
    Join Date
    Mar 2007
    Posts
    178
    Vote Rating
    0
    MD is on a distinguished road

      0  

    Default


    I don't think this has really been fully answered. So this has or has not changed since < 1.0 versions of Ext?

    The example at:

    http://www.yui-ext.com/deploy/yui-ex...stom-grid.html

    Using the data in http://www.yui-ext.com/deploy/yui-ex...custom-grid.js

    When compared to a Ext.grid.PropertyGrid in Ext 1.0, using the exact same data, you don't get the same field editors, except for the date field. With true/false in the Custom Grid, you get a true/false select list, numbers you get a numeric-only field, etc.

    While the method of doing it described in http://extjs.com/forum/showthread.ph...rtygrid+editor works fine, I'm curious as to why the previous sort of default behaviour/auto detection of field type is now gone.

  9. #9
    Sencha User MD's Avatar
    Join Date
    Mar 2007
    Posts
    178
    Vote Rating
    0
    MD is on a distinguished road

      0  

    Default


    Spoke too soon. For what it's worth, for anyone else who was interested in more info on it -- after taking my head out of my ass, I discovered (yet to be documented) in PropertyGrid.js, that PropertyGrid appears to have it's own ColumnModel, similar in nature to that of a normal EditorGrid; Ext.grid.PropertyColumnModel

    My attempt at getting the PCM to work, however, failed miserably. Could someone more fluent with this class possibly give a short example of the PropertyColumnModel, showing how to set an editor type and a renderer?

  10. #10
    Ext JS Premium Member cdomigan's Avatar
    Join Date
    Mar 2007
    Posts
    148
    Vote Rating
    1
    cdomigan is on a distinguished road

      0  

    Default


    Quote Originally Posted by MD View Post
    Could someone more fluent with this class possibly give a short example of the PropertyColumnModel, showing how to set an editor type and a renderer?
    I second this. Some documentation on the PropertyGrid would be most appreciated!

Similar Threads

  1. examples about PropertyGrid?
    By franklt69 in forum Ext 2.x: Help & Discussion
    Replies: 8
    Last Post: 23 Nov 2007, 5:45 AM
  2. ds with XmlReader in PropertyGrid
    By ushangar in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 25 Mar 2007, 8:45 PM
  3. Validating in a PropertyGrid
    By meucaroamigo in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 21 Mar 2007, 5:36 AM
  4. PropertyGrid Layout
    By alastairD in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 11 Mar 2007, 2:51 PM
  5. isValid propertyGrid ?
    By seldon in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 6 Mar 2007, 9:22 AM

Thread Participants: 5

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar