1. #1
    Ext User
    Join Date
    Sep 2010
    Location
    Probably here
    Posts
    35
    Vote Rating
    0
    gokujames is on a distinguished road

      0  

    Thumbs up [Solved] Reading button properties into Properties Grid

    [Solved] Reading button properties into Properties Grid


    could someone Explain me or provide the code to read properties of
    HTML Code:
    <input type='button' id='btnSample' value='Sample'/>
    and display that in propertiesGrid component
    Last edited by gokujames; 6 Sep 2010 at 1:34 AM. Reason: gave button a id and solved
    New findings at my lab: http://labs.deeptechtons.net
    learning Extjs from http://forum.deeptechtons.net

  2. #2
    Ext User
    Join Date
    Sep 2010
    Location
    Probably here
    Posts
    35
    Vote Rating
    0
    gokujames is on a distinguished road

      0  

    Default


    Such a simple question, takes such a long time to get answered
    ~Bump
    New findings at my lab: http://labs.deeptechtons.net
    learning Extjs from http://forum.deeptechtons.net

  3. #3
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    96
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    Code:
    propGrid.setSource(Ext.getDom('btnSample').attributes);

  4. #4
    Ext User
    Join Date
    Sep 2010
    Location
    Probably here
    Posts
    35
    Vote Rating
    0
    gokujames is on a distinguished road

      0  

    Default


    I donno if something is messing up with my code but all i get is a attribute named Length with value 4.
    Also how do i set the Source for the grid on the fly. something like when i select a button the grid should load up its properties.btw how will i show a select state, does Ext provide component to Select/Unselect a component like this http://jqueryui.com/demos/selectable/
    New findings at my lab: http://labs.deeptechtons.net
    learning Extjs from http://forum.deeptechtons.net

  5. #5
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    96
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    Sorry, that should have been:
    Code:
    var attrs = Ext.getDom('btnSample').attributes,
        source = {};
    for (var i = 0, len = attrs.length; i < len; i++) {
        source[attrs[i].name] = attrs[i].value;
    }
    propGrid.setSource(source);

  6. #6
    Ext User
    Join Date
    Sep 2010
    Location
    Probably here
    Posts
    35
    Vote Rating
    0
    gokujames is on a distinguished road

      0  

    Default


    Superb , i got this to working with the JQueryUI Selectable,Thanks condor.
    btw this reads just the attributes that are specified by user right ? If i get to read all attributes of button then is there some other property that i get to loop through
    New findings at my lab: http://labs.deeptechtons.net
    learning Extjs from http://forum.deeptechtons.net

  7. #7
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    96
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    No, there isn't something like an 'availableAttributes' property. You will have to keep a list of all available attributes for each nodeName.

  8. #8
    Ext User
    Join Date
    Sep 2010
    Location
    Probably here
    Posts
    35
    Vote Rating
    0
    gokujames is on a distinguished road

      0  

    Default


    that means more work for me, i love work .[Does Ext have Selectable widget like jqueryui bcoz i love Ext more than jqueryUI] thank you for the help condor.
    New findings at my lab: http://labs.deeptechtons.net
    learning Extjs from http://forum.deeptechtons.net

  9. #9
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,508
    Vote Rating
    58
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    That thing looked like a DataView

  10. #10
    Ext User
    Join Date
    Sep 2010
    Location
    Probably here
    Posts
    35
    Vote Rating
    0
    gokujames is on a distinguished road

      0  

    Default


    ? Which thing , you mean this http://jqueryui.com/demos/selectable/
    New findings at my lab: http://labs.deeptechtons.net
    learning Extjs from http://forum.deeptechtons.net

Similar Threads

  1. Get all nested properties in a flat list of properties?
    By abcdef in forum Ext 3.x: Help & Discussion
    Replies: 4
    Last Post: 14 Jun 2010, 9:24 PM
  2. add simple qtip (tooltip) on toolbar button with title and other properties
    By santoshsatav in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 31 May 2010, 8:17 PM
  3. Change Button properties
    By Taras in forum Ext 2.x: Help & Discussion
    Replies: 6
    Last Post: 3 Nov 2008, 12:30 AM
  4. Grid - No properties problem
    By jwong in forum Ext 2.x: Help & Discussion
    Replies: 8
    Last Post: 1 May 2008, 1:02 PM
  5. Replies: 9
    Last Post: 20 Jun 2007, 7:36 PM

Thread Participants: 2

Tags for this Thread