1. #1
    Sencha User
    Join Date
    Jun 2010
    Posts
    12
    Vote Rating
    3
    rixo is on a distinguished road

      2  

    Default RadioColumn

    RadioColumn


    A grid column rendering as radio buttons, allowing the user to select one row per group.

    Ext.ux.RadioColumn extends from Ext.column.grid.CheckColumn, so usage is similar. The difference is that checkboxes are lonesome animals, while radio buttons are eusocial.

    Use the `groupField` option to define groups and make them happy. If `groupField` is already set at the store level (because you're using a grouping grid, for example), you won't need to repeat it in the column component.

    Compatibility
    Tested working with Ext 4.2.0
    Tested not working with Ext 4.2.1. The row index is not detected correctly in the checkchange events, with grid grouping, when some groups are collapsed... This is an issue with Ext itself, resulting in erratic behaviour when grid groups are collapsed.

    Update 1
    Code updated: minor fixes and performance tweaks.


    See it in action:

    Attached Files
    Last edited by rixo; 28 Jul 2013 at 9:32 AM. Reason: Code updated, and added version information

  2. #2
    Sencha - Services Team
    Join Date
    Aug 2007
    Posts
    98
    Vote Rating
    0
    mdlincoln is on a distinguished road

      0  

    Default


    Nice work. One area that might be a place for potential optimization is the use of the each() method to reset all of the field values in the unchecked records to false. The each() method does make the code concise and is easy to implement, however, if the data store or the number of groups is large, this could pose a potential drag in setting the unchecked records since the each() method will execute a function for every record. Using a vanilla "for" loop will be faster and since this is a reusable component, optimal performance will probably be a big benefit for its future use.

    Mark

  3. #3
    Sencha User
    Join Date
    Jun 2010
    Posts
    12
    Vote Rating
    3
    rixo is on a distinguished road

      0  

    Default


    Thanks, Mark. I've updated the code to implement your suggestion. I was wondering if the difference was still significant with modern Javascript engines, so I benchmarked both loops with the latest version of Chrome and recorded a difference of about 10%.

  4. #4
    Sencha User
    Join Date
    Mar 2011
    Posts
    4
    Vote Rating
    0
    flek is on a distinguished road

      0  

    Default


    Thanks a bunch for this, I've been looking for something like radiocolumn

Thread Participants: 2

Tags for this Thread

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