Results 1 to 2 of 2

Thread: Check/tick mark not appearing in CheckBoxColumn for dynamic row selection in a grid

  1. #1
    Sencha User
    Join Date
    Feb 2008
    Posts
    42
    Vote Rating
    0
      0  

    Exclamation Check/tick mark not appearing in CheckBoxColumn for dynamic row selection in a grid

    I have an editor grid panel with CheckboxSelectionModel as the SelectionModel. I want to pre-select rows in the grid as soon as the page loads completely. I'm able to achieve this by using:
    Code:
    productsGridPanel.getSelectionModel().selectRow(1);
    The selection is done successfully and even the rowselect event gets fired. But, the check mark in the checkbox column does not appear. I'm not sure why this is happening. I would also like to know if it is possible to pre-select rows by providing true or false values to the data store. Here's the code to create the grid panel:

    Code:
        productsStore = new Ext.data.SimpleStore
    	({
    	    id: "productsStore",
    	    data: productsData,
    	    fields: 
    	    [
    	       {name: "prodID"},
    	       {name: "prodName"},
    	       {name: "prodPrice"},
    	       {name: "prodSelect", type: "boolean"},
    	       {name: "prodOriginalPrice"}
    	    ]
    	});
    
    checkboxColumn = new Ext.grid.CheckboxSelectionModel
    	({
    		id: "checkboxColumn",
    		name: "{actionForm.selectedProducts}",
    		singleSelect: false,
    		dataIndex: 'prodSelect',
    		width: 30
    	});
    	
    	checkboxColumn.on("rowselect",displayTotalPrice);
    	checkboxColumn.on("rowdeselect",displayTotalPrice);
    	
    	productsColumnModel = new Ext.grid.ColumnModel
        ({
            columns:
            [
            	checkboxColumn,
            	{
    	        	hidden: true,
    	        	dataIndex: 'prodID'
    	        },
            	{
    	        	header: "<b>Product Name</b>",
    	        	width: 140,
    	        	sortable: false,
    	        	resizable: false,
    	        	dataIndex: 'prodName'
    	        },
    	        {
    	        	header: "<b>Product Price</b>",
    	        	width: 50,
    	        	sortable: false,
    	        	resizable: false,
    	        	dataIndex: 'prodPrice',
    	        	editor: new Ext.form.TextField
    	        	({
                    	allowBlank: false,
                    	regex: /^\d+(\.\d+)?$/
                	}),
                    renderer: Ext.util.Format.usMoney
    	        },
            	{
    	        	hidden: true,
    	        	dataIndex: 'prodOriginalPrice'
    	        }
            ]
        });
        
    	productsGridPanel = new Ext.grid.EditorGridPanel
    	({
    	    id: 'productsGridPanel',
    	    store: productsStore,
    	    cm: productsColumnModel,
    	    viewConfig: 
    	    {
    	        forceFit:true
    	    },
    	    width: 660,
    	    autoHeight: true,
    	    autoScroll: false,
    	    stripeRows: true,
    	    enableColumnHide: false,        
    	    sm: checkboxColumn,
    	    renderTo: Ext.get("divProductsTable")
    	});

  2. #2
    Sencha User
    Join Date
    Jun 2016
    Posts
    1
    Vote Rating
    0
      0  

    Default

    I am also facing this issue does anyone have solution for this. Actually I am new to sencha framework.

Similar Threads

  1. Ext.ux.grid.CheckboxColumn
    By tcl_java in forum Ext 3.x: User Extensions and Plugins
    Replies: 7
    Last Post: 16 May 2010, 12:54 PM
  2. Replies: 5
    Last Post: 4 May 2010, 12:00 PM
  3. Replies: 1
    Last Post: 24 Jun 2009, 6:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •