1. #1
    Sencha User
    Join Date
    Nov 2010
    Location
    Villaflores,Chiapas,Mexico
    Posts
    90
    Answers
    8
    Vote Rating
    2
    icebergdelphi is on a distinguished road

      0  

    Default Unanswered: checkboxmodel+getRowClass = Bug?

    Unanswered: checkboxmodel+getRowClass = Bug?


    Hi friends, i'm getting to add a CheckboxModel in my Grid, but if i use getRowClass to add an image to my cell, the CheckBoxModel appears with my css image, as you can see in the next images.

    so i wonder myself that this could be a BUG?, i'm trying to use in a column model: renderer: function(value, metaData, record, rowIndex, colIndex, store) to get the css, but it does not works.

    Thanks.




    Code:
        columns: [
                                {
                                    xtype: 'gridcolumn',
                                    dataIndex: 'name',
                                    text: 'Nombre',
                                    resizable: true,
                                    flex:1,
                                    itemId: 'name',
                                    editor: {
                                            xtype: 'textfield'
                                        }
                                    renderer: function(value, metaData, record, rowIndex, colIndex, store) 
                                    {
                                            //metadata.tdAttr
                                           return  metaData.tdCls = record.get('row_class');
                                    }                         
                                },

    this is my code with out checkboxmodel:

    Code:
    var GridView = Ext.create('Ext.grid.Panel', {
                        height: 409,
                        store:storeGrid,
                        width: 531, 
                        plugins:[CellEditing],
                        
                           columns: [
                                {
                                    xtype: 'gridcolumn',
                                    dataIndex: 'name',
                                    text: 'Nombre',
                                    resizable: true,
                                    flex:1,
                                    itemId: 'name',
                                    editor: {
                                            xtype: 'textfield'
                                        }
                                                         
                                },
                                {
                                    xtype: 'numbercolumn',
                                    dataIndex: 'size',
                                    text: 'Tamaño',
                                    resizable: true,
                                    flex:1,
                                    renderer: Ext.util.Format.fileSize
                                },
                                {
                                    xtype: 'gridcolumn',
                                    dataIndex: 'type',
                                    text: 'Tipo',
                                    resizable: true,
                                    flex:1
                                },
                                {
                                    xtype: 'datecolumn',
                                    dataIndex: 'date_modified',
                                    text: 'Fecha Modificación',
                                    resizable: true,
                                    flex:1
                                }
                            ],
                            viewConfig: {
                                       
                                    plugins: [
                                        Ext.create('Ext.grid.plugin.DragDrop', {
                                            ptype: 'gridviewdragdrop'
                                        })
                                        
                                    ],
                                    forceFit: false,
                                    emptyText: 'No hay archivos que mostrar',
                                    enableRowBody: true,
                                    getRowClass: function (record, rowIndex, rowParams, store) {
                                            return  'ux-filebrowser-iconrow ' +record.get('row_class');
                                    }
                            }
                            
                            
            });
    and this is my code with checkboxmodel:

    Code:
    var GridView = Ext.create('Ext.grid.Panel', {
                        height: 409,
                        store:storeGrid,
                        width: 531, 
                        plugins:[CellEditing],
                        selModel:{
                            selType: 'checkboxmodel',
                            headerWidth: 100,
                            allowDeselect: true,
                            showHeaderCheckbox: true,
                            mode:'MULTI'
                        },
                           columns: [
                                {
                                    xtype: 'gridcolumn',
                                    dataIndex: 'name',
                                    text: 'Nombre',
                                    resizable: true,
                                    flex:1,
                                    itemId: 'name',
                                    editor: {
                                            xtype: 'textfield'
                                        }
                                                         
                                },
                                {
                                    xtype: 'numbercolumn',
                                    dataIndex: 'size',
                                    text: 'Tamaño',
                                    resizable: true,
                                    flex:1,
                                    renderer: Ext.util.Format.fileSize
                                },
                                {
                                    xtype: 'gridcolumn',
                                    dataIndex: 'type',
                                    text: 'Tipo',
                                    resizable: true,
                                    flex:1
                                },
                                {
                                    xtype: 'datecolumn',
                                    dataIndex: 'date_modified',
                                    text: 'Fecha Modificación',
                                    resizable: true,
                                    flex:1
                                }
                            ],
                            viewConfig: {
                                       
                                    plugins: [
                                        Ext.create('Ext.grid.plugin.DragDrop', {
                                            ptype: 'gridviewdragdrop'
                                        })
                                        
                                    ],
                                    forceFit: false,
                                    emptyText: 'No hay archivos que mostrar',
                                    enableRowBody: true,
                                    getRowClass: function (record, rowIndex, rowParams, store) {
                                            return  'ux-filebrowser-iconrow ' +record.get('row_class');
                                    }
                            }
                            
                            
            });
    Problem.JPG

    Good.JPG

  2. #2
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    5,040
    Answers
    391
    Vote Rating
    185
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      0  

    Default


    Can you share your CSS as well?

Thread Participants: 1