[CLOSED] Column visible index and HeaderRow disables column move in GridPanel
Hi,
When i add a Header Row to my GridPanel, the column Move functionality does not work. Is this by design. If so will a changed be made in the future to fascilitate moving a column in a GridPanel that has a HeaderRow.
Is there a way to specify and retrieve the visible index of a column. example, when a column is moved, can this new index be captured so that it can be specified when the gridpanel is loaded in the future. I am saving the settings of the gridlayout and would like to be able to get and set this property on a gridpanel column.
RE: [CLOSED] Column visible index and HeaderRow disables column move in GridPanel
Hi,
When
i add a Header Row to my GridPanel, the column Move functionality does
not work. Is this by design. If so will a changed be made in the future
to fascilitate moving a column in a GridPanel that has a HeaderRow.
HeaderRow deactivates column moving because moving destroys controls inside header row.
Is
there a way to specify and retrieve the visible index of a column.
example, when a column is moved, can this new index be captured so that
it can be specified when the gridpanel is loaded in the future. I am
saving the settings of the gridlayout and would like to be able to get
and set this property on a gridpanel column.
You can handle ColumnMove event of the GridPanel
columnmove : ( <code style="font-style: normal; font-weight: normal; font-family: 'Lucida Console','Courier New',Courier,monospace; font-size: 12px;">Number oldIndex</code>, <code style="font-style: normal; font-weight: normal; font-family: 'Lucida Console','Courier New',Courier,monospace; font-size: 12px;">Number newIndex</code> )<div class="mdesc" style="margin: 0px; padding: 5px 0px; color: rgb(68, 68, 68);"><div class="long" style="margin: 0px; padding: 0px; display: block; line-height: 18px;">Fires when the user moves a column<div class="mdetail-params" style="margin: 10px 0px 0px; padding: 0px 0px 0px 12px; font-size: 12px;"><strong style="font-style: normal; font-weight: normal; display: block; margin-bottom: 3px; font-size: 11px; color: rgb(85, 85, 85);">Listeners will be called with the following arguments:[/b]<ul style="margin: 12px; padding: 0px; list-style-type: circle; list-style-position: inside;"><li style="margin: 0px; padding: 0px; list-style-position: inside; list-style-type: circle;"><code style="font-style: normal; font-weight: normal; font-family: 'Lucida Console','Courier New',Courier,monospace; font-size: 12px;">oldIndex</code> : Number<li style="margin: 0px; padding: 0px; list-style-position: inside; list-style-type: circle;"><code style="font-style: normal; font-weight: normal; font-family: 'Lucida Console','Courier New',Courier,monospace; font-size: 12px;">newIndex</code> : Number[/list]
Also you can always to call the following code to determine column position by data index
Code:
grid.getColumnModel().findColumnIndex('dataindex')
RE: [CLOSED] Column visible index and HeaderRow disables column move in GridPanel
Thanks alot, that helped a lot.
How can you specify the column index from server side in my case where i am building and loading my grid panel dynamically from the server side. I am not seeing a column index property.
RE: [CLOSED] Column visible index and HeaderRow disables column move in GridPanel
Hi,
How can you specify the column index from server side in my case where i am building and loading my grid panel dynamically from the server side.
Just place columns to the Columns collection using correct sequence (sequence in the Columns collection correspond to the grid's columns positions)