We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Grid doesnt display numbers

I am using Syncfusion grid in Frappe Framework. Its behavior is rather strange. It just doesnt display numbers at all. Everything works flawlessly. Can someone please tell me whats wrong here.

Here is my data.

items = [{item_code: '100', item_name: 'SURBEX Z TAB (30S)', purchase_price: 227.21, selling_price: 267.3,
  retail_price_incl_tax: 267.3}]


Here is my grid instance

var grid = new ej.grids.Grid({
    dataSource: gridData,
    allowPaging: true,
    allowFiltering: true,
    filterSettings: { type: 'Excel' },
    enablePersistence: true,
    editSettings: {
      allowEditing: true,
      allowUpdating: true,
      mode: 'Normal'
    },
    toolbar: [
      'Edit',
      'Update',
      'Cancel',
      'Search'
    ],
    columns: [
      { field: 'name', headerText: 'Item ID', isPrimaryKey: true, visible: false },
      { field: 'item_code', headerText: 'Item Code', textAlign: 'Center', width: 120 },
      { field: 'item_name', headerText: 'Item Name', textAlign: 'Center', width: 150 },
      { field: 'purchase_price', headerText: 'Purchase Price', textAlign: 'Center', width: 200, type:'number'},
      { field: 'selling_price', headerText: 'Selling Price', textAlign: 'Center', width: 120, type:'number'},
      { field: 'retail_price_incl_tax', headerText: 'Retail Incl Tax', textAlign: 'Center', width: 120, type:'number'},
    ],

    created: () => {
      const searchBar = document.getElementById(grid.element.id + "_searchbar");
      searchBar.addEventListener('keyup', () => {
              grid.search(event.target.value)
             
      });

      searchBar.addEventListener('keydown', (event) => {
        if (event.key === 'Tab') {
          event.preventDefault();
          if (grid.getRows().length > 0) {
            grid.selectRow(0);
            const firstCell = grid.getCellFromIndex(0, 0);
            firstCell.focus();
          }
        }
      });
  },

  rowSelected: (args) => {
    console.log(args.data);
  }

 

   
   
  });



1 Reply

JC Joseph Christ Nithin Issack Syncfusion Team April 10, 2023 07:31 PM UTC

Hi Ehsen,


   Greetings from Syncfusion support.


    We tried to reproduce the issue by preparing a sample using the code example provided, but we were not able to reproduce the issue from our side.


  • Simple sample to replicate the issue.
  • Video demo of your requirement.
  • Syncfusion package version you are using.


Regards,

Joseph I.




Loader.
Up arrow icon