Results 1 to 4 of 4

Thread: How to select a node in a Dataview

  1. #1
    Sencha User
    Join Date
    Oct 2007
    Seattle, WA

    Default How to select a node in a Dataview

    I'm trying to programmaticly select an item in a DV. I see the method in the API, but after passing it a css selector, number, etc... it doesn't seem to fire the selectionChanged or any other event of the Dataview.

    I'm trying to select a particular row in the table that my Dataview is rendering. I've also tried an Ext.get() for the id of the row after the DV is rendered, but that doesn't seem to work either.

    Anyone have any ideas?!

    Ultimately I want to highlight the row that was just added to the table. Also tried creating a record and adding that to the store to update the DV, but the store.add() always throws an error when adding a record.

    Thanks allot...

  2. #2


    I do like this (currentFileId is the id of selected node):
    			var el = Ext.get('cms-img-chooser-img-'+this.currentFileId)
    my data view template like this:
    		this.thumbTemplate = new Ext.XTemplate(
    				'<tpl for=".">',
    				'<div class="thumb-wrap" id="cms-img-chooser-img-{id}">',
    				'<div class="thumb"><img src="{thumbnail_url}" title="{title}"></div>',
    				'<div class="x-clear"></div>');

  3. #3
    Sencha User
    Join Date
    Mar 2007

    Default works perfectly for me. Selects node zero, fires the events, and everything kicks off to display details.

  4. #4
    Sencha Premium User
    Join Date
    Apr 2008


    Just to confirm, this still works in ExtJS 6.5.3

Posting Permissions

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