This is a migrated thread and some comments may be shown as answers.

Retrieve view column index

2 Answers 856 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Pierre
Top achievements
Rank 1
Pierre asked on 01 Jul 2015, 04:33 PM

Hi,

Is there any way to retrieve a view column index from the model ( myGrid.columns ) ?

I'm looking for a method like viewIndex() on a column object such like the following code ( or viewIndex(column) ) :

for (var i = 0; i < myGrid.columns.length; i++) {
    var column = myGrid.columns[i];
    console.log('Model column index : ' + i + ' - View column index : ' + column.viewIndex());
}

Have you any idea ?

 Thanks for your help.

 

 

 

2 Answers, 1 is accepted

Sort by
0
Accepted
TorgueFan
Top achievements
Rank 1
answered on 01 Jul 2015, 11:29 PM

Hello Pierre,

Take a look the approach in this example. It gets the column index from an 'on click' event.

First, it gets the row, and then it uses the row to get the column index. 

 

0
Pierre
Top achievements
Rank 1
answered on 02 Jul 2015, 08:39 AM

Ok thanks.

 

The problem was on my own code. It's solved.

Tags
Grid
Asked by
Pierre
Top achievements
Rank 1
Answers by
TorgueFan
Top achievements
Rank 1
Pierre
Top achievements
Rank 1
Share this question
or