View Full Version : Ext.tree.Panel: can't hide the root

3 Oct 2016, 11:29 PM
Hi guys, I've been searching all over sencha manuals and popular forums, but can't find the solution for my isssue.
It is that "rootVisible: false" doesn't hide the root of my tree.

I have a MVVM, and here are the files:
ViewModel contains:

stores: {
//some other data,
assets: {
type: 'tree',
model: 'App.model.Asset',
autoLoad: true,
remoteFilter: true,
rootVisible: false,
root: {
id: 0,
expanded: true
filters: [
{ property: 'platform', value: '{platform.value}' },
{ property: 'district', value: '{district.value}' }

Then View derives from a Container, one of its items is:

xtype: 'treepanel',
layout: 'fit',
flex: 1,
reserveScrollbar: true,
columns: [{
xtype: 'treecolumn',
locked: true,
text: 'Описание',
dataIndex: 'text',
width: 500
}, {
text: 'Тип',
dataIndex: 'type'
}, { // all the other columns...
bind: '{assets}'

My .cs controller returns an IEnumerable<Asset> entity which is successfully mapped and displayed, BUT it all starts with a Root which I cannot hide.
Maybe there's a trick to which model format should my controller return?

3 Oct 2016, 11:50 PM
So I just found the solution. Honestly, just by tinkering everything line by line and not thinking about it.
I removed "locked: true" from my View code and the root got hidden.
Hope it helps someone who is is stuck as I was.

Gary Schlosberg
5 Oct 2016, 3:38 PM
Strange setting for a view. Glad you were able to get to the bottom of this, and thanks for following up with the community.