View Full Version : Problem whit TreeGrid selecting row

17 May 2010, 2:20 PM
Hello everyone!
I'm new in Extjs framework, I've been doing a small application that uses the treegrid to show a bill of materials, the problem is that I need to perform certain actions, when i choose one of the rows. I tried everything but I can not run the RowSelectionModel as in a normal Grid, and I have not found much documentation about this new TreeGrid.
If anyone can help me I would appreciate it,or if you know any other event that allows me to get the row number for example: click, doubleclic, etc. That would help me also.

this is a part of my code:

function crea_grid(){

trees = new Ext.ux.tree.TreeGrid({
title: 'Bill de Materiales: '+con,
width: 500,
height: 300,
renderTo: 'divBOM',//Ext.getBody(),
enableDD: true,
expand: true,
header: 'Componente',
dataIndex: 'componente',
width: 150
header: 'Cantidad',
dataIndex: 'cantidad',
width: 60
header: 'Scrap',
width: 40,
dataIndex: 'scrap'
header: 'Tipo',
width: 40,
dataIndex: 'tipo'
header: 'Descripcion',
dataIndex: 'descripcion'
sm: new Ext.grid.RowSelectionModel({
singleSelect: true,
moveEditorOnEnter: false,
listeners: {
rowselect: function(sm, rowIndex, record){
dataUrl: 'bom_consulta.php?dato=1168'+con


18 May 2010, 12:42 PM
nobody knows anything about this?

25 May 2010, 4:48 AM
Use Ext.tree.DefaultSelectionModel and selectionchange event.


27 May 2010, 11:28 AM
thanks,it works for me! even though I had to do foreign javascript code to get the values. But surely this would help me in the future, thanks again