grid.ColumnModel.Columns(i).Editable = False 'version 1.5--->2.0

  1. #1

    grid.ColumnModel.Columns(i).Editable = False 'version 1.5--->2.0

    Editable is no longer a member of Ext.net.columnbase in V2.0
    I am runnin the following in code-behind based on criteria ie:
    Version 1.5
     If (grid.ColumnModel.Columns(i).Header = "") Then
                        grid.ColumnModel.Columns(i).Editable = False
                        grid.ColumnModel.Columns(i).Hidden = True
                    End If
    Version 2.0 attempt
    If (grid.ColumnModel.Columns(i).text = "") Then
                        grid.ColumnModel.Columns(i).Editable = False
                        grid.ColumnModel.Columns(i).Hidden = True
                    End If
  2. #2
    Just do not define Editor for a column and it will not be editable
  3. #3

    That might not work in this instance:

  4. #4

    Can i use readonly in this instance?

  5. #5
    You can handle BeforeEdit event of CellEditing plugin nad return false to disable editing
    http://docs.sencha.com/ext-js/4-1/#!...ent-beforeedit
  6. #6

    Further into beforeEdit!

    Quote Originally Posted by Vladimir View Post
    You can handle BeforeEdit event of CellEditing plugin nad return false to disable editing
    http://docs.sencha.com/ext-js/4-1/#!...ent-beforeedit
    This all happens on client-side then??I seem not be getting how i can utilise
    BeforeEdit
    to the server-side as i wil need to set editable to false from there.
  7. #7

    very ugly part solution:(

    this is the part solution i am using for now but wil only work for one instance as the grid columns will keep changing later.Using this in test phase so have only one instance to run it on:

    <Plugins>
                            <ext:CellEditing ID="CellEditing1" runat="server" ClicksToEdit="1">
                                 <Listeners>
                                    <BeforeEdit Handler="if (e.column.id === 'col_campo7'|| e.column.id === 'col_campo13' || e.column.id === 'col_campo19' || e.column.id === 'col_campo25' || e.column.id === 'col_campo28' || e.column.id === 'col_campo40') {
                                                 return false; //to cancel editing         
                                             }"/>
                                </Listeners> 
                            </ext:CellEditing>
                        </Plugins>
    Will keep you posted as i stumble along to find perfection..

Similar Threads

  1. Replies: 12
    Last Post: Sep 07, 2012, 2:42 PM
  2. Replies: 0
    Last Post: Aug 23, 2012, 11:55 PM
  3. [CLOSED] TreeGrid with editable columns
    By Daly_AF in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jun 15, 2012, 12:00 PM
  4. Replies: 2
    Last Post: Nov 09, 2011, 5:00 AM
  5. Replies: 3
    Last Post: Feb 09, 2011, 3:17 PM

Posting Permissions