Delete Dropdown values using Delete Keyword

Posted by: deepak.dubey on 15 April 2020, 7:13 am EST

    • Post Options:
    • Link

    Posted 15 April 2020, 7:13 am EST

    HI,

    I have a query regarding dropdown in wjmos.

    I want to select multiple cells for example two dropdowns and one normal cell and want to delete with the help of Delete keyword.

    Is it possible in flexgrid wijmos?

    Regards

  • Posted 16 April 2020, 1:03 am EST

    Hi Deepak,

    Each of the cells of the FlexGrid can be deleted using the Delete key. But the columns with DataMaps are required by default, so you will need to set the isRequired property of these columns to false so that they can be deleted. Please refer to the sample link below for reference:

    https://stackblitz.com/edit/js-cibthc

    Regards,

    Ashwin

  • Posted 16 April 2020, 2:43 am EST

    Hi Ashwin,

    Thanks to respond.

    But I am unable our columns with delete keyword. I am selecting multiple columns and press delete keyword but only single cell the last one is deleted. but I want delete all selected cells on press delete keyword. I paste my grid configuration here. I am also try with isRequired property.

    outstandingGrid = new wijmo.grid.FlexGrid(‘#outstandingGrid’, {

    autoGenerateColumns: false,

    columns: [

    { binding: ‘Sel’, header: ‘Select’, width: 75,allowMerging: false,isRequired:false },

    { binding: ‘outstandingEquityDataType’, header: ‘Data Type ()', width: 130, allowMerging: false ,showDropDown:true, dataMap:getDataTypeList(),isRequired:false},

    { binding: ‘outstandingEquityComponent’, header: ‘Equity Component’, width: 200,allowMerging: false, showDropDown:true, dataMap:[“”],isRequired:false},

    { binding: ‘asReportedDate’, header: 'As Reported Date (
    )’, width: 180,format: ‘yyyy-MM-dd’, allowMerging: false,isRequired: false },

    { binding: ‘outstandingEquitySubShareType’, header: ‘Share Type’, width: 140, allowMerging: false, showDropDown:true, dataMap:getShareTypeList(),isRequired:false },

    { binding: ‘outstandingShareNumber’, header: ‘Share Number ()', width: 150, allowMerging: false,isRequired:false },

    { binding: ‘outstandingEquityScale’, header: ‘Scale’, width: 130,allowMerging: false, showDropDown:true, dataMap: getScaleTypeList(),isRequired:false},

    { binding: ‘isTBC’, header: ‘TBC’, width: 80,allowMerging: false,showDropDown:true, dataMap:tbcList.split(“,”),isRequired:false },

    { binding: ‘sourceFrom’, header: 'Source From (
    )’, width: 150,allowMerging: false,showDropDown:true, dataMap:sourceFormList.split(“,”),isRequired:false },

    { binding: ‘analystNotes’, header: ‘Analyst Notes’, width: 100,allowMerging: false,isRequired:false}

    ],

    itemsSource:cvTrackingChangesOutstandingData,

    allowAddNew: true,

    allowMerging: ‘Cells’,

    keyActionTab: ‘CycleOut’,

    allowDelete: true,

    showMarquee: true,

    Regards

  • Posted 16 April 2020, 3:37 am EST

    I am using normal Javascript Framework.

    is any impact of this of your code

    import { FlexGrid, DataMap } from “@grapecity/wijmo.grid”;

  • Posted 17 April 2020, 12:29 am EST

    Hi Deepak,

    The issue is not related to any framework.

    Can you check the following and let us know the results:

    1. Whether the data is deleted from the itemsSource of the grid when you press the delete key?
    2. Can you delete a cell in each of the column when only 1 cell is selected?
    3. Whether this issue only occurs when a data map cell is selected or for all the cells?
    4. Is there any error shown on the console?

    ~regards

  • Posted 17 April 2020, 6:00 am EST

    Hi Ashwin,

    Please find below results.

    1. Whether the data is deleted from the itemsSource of the grid when you press the delete key? - yes
    2. Can you delete a cell in each of the column when only 1 cell is selected? - yes
    3. Whether this issue only occurs when a data map cell is selected or for all the cells? - yes when select multiple columns
    4. Is there any error shown on the console? - yes

      at Event.raise (wijmo.min.js:14)

      at FlexGrid.onCellEditEnding (wijmo.grid.min.js:14)

      at _KeyboardHandler._deleteRange (wijmo.grid.min.js:14)

      at wijmo.grid.min.js:14

      at FlexGrid.Control.deferUpdate (wijmo.min.js:14)

      at _KeyboardHandler._deleteSel (wijmo.grid.min.js:14)

      at _KeyboardHandler._keydown (wijmo.grid.min.js:14)

    Regards

  • Posted 20 April 2020, 7:21 am EST

    Hi,

    We will require a sample for further investigation. Can you please modify the sample below so that it replicates your issue:

    https://stackblitz.com/edit/js-4hey3t

    Also, can you let us know the version of Wijmo that you are using? Also, have you added an event handler for cellEditEnding event?

    ~regards

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels