Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Ext.dataview.List Current Selection

  1. #1

    Join Date
    Nov 2010
    Location
    Canton, GA, USA
    Posts
    190
    Answers
    6

    Default Answered: Ext.dataview.List Current Selection

    Feel silly for asking this as I think it should be obvious but I'm using Modern and have a Ext.dialog with a single "list" item in it. I Ext.Viewport.add() the dialog with a handler for the ok button. In that handler, I have the list object and am looking to see which record is selected but don't see anything like getCurrentSelection() or something like that of use. Do I need to handle select events myself? Should the list be embedded into another component? Surely I'm missing something important...


  2. #2
    Sencha User
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890
    Answers
    41

  3. #3

    Join Date
    Nov 2010
    Location
    Canton, GA, USA
    Posts
    190
    Answers
    6

    Default

    I read that as a config to set the initial selection when creating the component. Am I wrong on that? Anyone have an example?

  4. #4

    Join Date
    Nov 2010
    Location
    Canton, GA, USA
    Posts
    190
    Answers
    6

    Default

    Curious, "selection" is a config but marked READONLY? list.getConfig('selection') is returning undefined as I would expect since I didn't set it when I created the list. Tried adding a listener to the list for the "select" event but it's not firing.

  5. #5
    Sencha User
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890
    Answers
    41

    Default

    Configs are dynamic by nature.

  6. #6

    Join Date
    Nov 2010
    Location
    Canton, GA, USA
    Posts
    190
    Answers
    6

    Default

    Think I'm getting closer with list.getSelectable().getSelected().items. I assumed getSelectable() returned a boolean. Seems it's returning something along the lines of a selection-model from older version.


  7. #7
    Sencha User
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890
    Answers
    41

  8. #8

    Join Date
    Nov 2010
    Location
    Canton, GA, USA
    Posts
    190
    Answers
    6

    Default

    Smacking my forehead now but looking back, I don't see it documented.

  9. #9
    Sencha User
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890
    Answers
    41

    Default

    I posted a link to its documentation entry.

  10. #10

    Join Date
    Nov 2010
    Location
    Canton, GA, USA
    Posts
    190
    Answers
    6

    Default

    Ah! So a "foo" property has a corresponding getFoo() method even when it's not listed in the methods?

Page 1 of 2 12 LastLast

Similar Threads

  1. Ext.dataView.List selection is very slow
    By th3nu11 in forum Sencha Touch 2.x: Q&A
    Replies: 2
    Last Post: 6 Jul 2013, 1:20 PM
  2. [INFOREQ] Dataview/list selection when store is reloaded
    By mangvlad in forum Sencha Touch 2.x: Bugs
    Replies: 6
    Last Post: 17 Feb 2012, 4:56 PM
  3. making current selection active in nestedlist
    By tijs in forum Sencha Touch 1.x: Discussion
    Replies: 0
    Last Post: 20 Aug 2010, 7:21 AM
  4. How do I get the current grid row selection's ID?
    By darren in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 5 Apr 2010, 1:32 PM
  5. [HtmlEditor] get the current selection
    By pi2 in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 5 Oct 2007, 5:44 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •