CheckColumn Checked

  1. #1

    CheckColumn Checked

    Hi,
    I would like know what's the function to know if the CheckColumn is checked or no?

    <ext:CheckColumn ColumnID="mnuPermissao" Header="Permissão" Align="Center" Sortable="true" DataIndex="mnuPermissao" Width="70" Editable="true">                                                                                        
             <Renderer Handler="if(checked){#{GridPanel1}.disable();}" />                                            
    </ext:CheckColumn>
    Maia
    Coolite 0.8.1
  2. #2

    RE: CheckColumn Checked

    Hy!
    I tried with function below:

    <Renderer Handler="if(checked){#{GridPanel1}.disable();}" />
    but error occurred

     checked is not defined
    Any tip?
    Maia
    Coolite 0.8.1

  3. #3

    RE: CheckColumn Checked

    Hi Maia,

    You can use 'value' instead of 'checked'.

    A simple way of determining the parameter names is to inspect the configuration script. You should find something similar to the following.

    Example

    renderer : function (value, metadata, record, rowIndex, colIndex, store) { /* YOUR LOGIC HERE */ }
    The first parameter is the field value.

    More information regarding the renderer is also available at the following location, see

    http://www.extjs.com/deploy/dev/docs...ember=renderer

    Geoffrey McGill
    Founder
  4. #4

    RE: CheckColumn Checked

    Hi Geoffrey!
    I tried your tip, but when I put the Script with Renderer Checkbox disappeared from the grid. See the attachment.

    <script type="text/javascript">
        var checkPermissao = function(value, metadata, record, rowIndex, colIndex, store) {
            alert(record.data.mnuDescricao);        
            
        };
    </script>
    
    <ext:CheckColumn ColumnID="mnuPermissao" Header="Permissão" Align="Center" Sortable="true"  DataIndex="mnuPermissao" Width="70" Editable="true">                                              
                <Renderer fn="checkPermissao" /> 
    </ext:CheckColumn>
    Tks.
    Maia
    Coolite 0.8.1
  5. #5

    RE: CheckColumn Checked

    Hi Maia,

    The Renderer must return the html required to render the contents of that particular cell. You can confirm by returning the value.


    Example


    return value.toString();

    Please note as well, the renderer will fire once for each record. If you're calling alert(), the alert will render once for each record being renderer in your GridPanel.


    Hope this helps.


    Geoffrey McGill
    Founder
  6. #6

    RE: CheckColumn Checked

    Hi Geoffrey,

    para verificar se o checbox está assinalado.">In the Checbox have the function <Check handler> to verify that the checbox is marked or not.
    With CheckColumn is it possible?

    Tks Maia.
    Coolite 0.8.2
  7. #7

    RE: CheckColumn Checked

    Hi,

    You have to read check column value from the store. Do not use renderer for it. For example, for first row
    Store1.getAt(0).get('mnuPermissao')
  8. #8

    RE: CheckColumn Checked

Similar Threads

  1. CheckColumn is editable?
    By 78fede78 in forum 1.x Help
    Replies: 2
    Last Post: Jan 18, 2013, 12:46 PM
  2. Replies: 0
    Last Post: Sep 26, 2011, 12:20 PM
  3. checkcolumn
    By pankaj in forum 1.x Help
    Replies: 0
    Last Post: Mar 31, 2010, 3:00 AM
  4. Dynamic CheckColumn is not checked
    By alco in forum 1.x Help
    Replies: 4
    Last Post: Oct 01, 2009, 9:52 AM
  5. get value from checkcolumn
    By maxdiable in forum 1.x Help
    Replies: 2
    Last Post: Jul 10, 2009, 6:28 PM

Posting Permissions