CellType issue - shows editable cell instead of combobox button or custom cntrl

Posted by: priti_patil on 19 September 2019, 3:30 am EST

    • Post Options:
    • Link

    Posted 19 September 2019, 3:30 am EST

    I am working on a migration of a windows Forms application from version 2005 i.e. .NET2.0 to 2015 i.e. .NET4.5. Original code uses FarPoint Spread v2.5. Now I am trying to use version 11 of FpSpread control.

    I have a form with editable grid. It’s an order details entry form. Apart from regular Text, numeric and date cells I need to use cells with combo box and button CellTypes. Since I need some peculiar functionality in combbox, I am using a custom cell type for combobox and for button I am using ButtonCellType. But I am facing an issue with celltypes.

    I do set CellTypes in 3 different types of rows on different events.

    1. Form Load event - here I set CellTypes in a row that was created at design time. Both the CellTypes work fine. The dropdown gets opened on click and the ButtonClick event gets fired when clicked on the button cell.
    2. On a Refresh button click - I remove all the records from grid and add a new record using DefaultSheetDataModel AddRow method and then set CellTypes. It works fine. But the moment I remove the code from FormLoad that sets the CellTypes, it just stops working. When I click the cell, it shows cursor inside the cell instead of showing dropdown items or firing button click event. Both cells appear to be normal editable cells.
    3. On Add New button click - I add one more row in the grid at the last position and set CellTypes calling the same code that I use in FormLoad and Refresh. But still the CellTypes never work for this record. The cells keep on appearing to be normal editable cells and cursor is shown inside

    I am using the same functions for setting CellType in all 3 cases.

    The code from Form Load is not actually required. But #2 doesn’t work if I do not have that code, which is really weird

    #3 never works as expected

    One more thing to be noted is – I perform all the grid operations using this data model. The original code heavily depends upon the DefaultSheetDataModel.

    All this functionality was working absolutely fine in original version.

  • Posted 20 September 2019, 2:21 am EST

    Hello Priti,

    Is it possible for you to share the stripped-down sample so that I can replicate the exact at my end? This will be very helpful for us to narrow down the issue.

    Thanks,

    Mohit

  • Posted 20 September 2019, 2:45 am EST

    Hi Mohit,

    Thanks for the reply. The code is part of a large application and occurring in migrated project. Also, it uses a custom framework for grid operations. So I am not sure whether I can reproduce it in a fresh sample. But I’ll try and get back to you with a sample.

    Thanks!

  • Posted 20 September 2019, 3:05 am EST

    Hello,

    Thanks for your help. I am waiting for your sample for further progress.

    Regards,

    Mohit

  • Posted 23 September 2019, 5:26 am EST

    Hello Mohit,

    I am attaching here a sample code that will demonstrate the issue that I am facing. Looking forward to your help.

    Please note that the application I am working is a Japanese and the spread version we are using is also Japanese.

    Sorry for the delay.

    Thanks!

    SpreadCellTypeSampleWinApp.zip

  • Posted 23 September 2019, 7:04 am EST

    Hello Priti,

    I am able to reproduce the issue with spread 11 however, I am not able to reproduce the issue with the latest version of spread i.e Spread12. Could you please check with the latest version. You can download the same at the following location:

    https://www.grapecity.co.jp/developer/download?utm_medium=link&utm_source=tools-top-section#spreadsheet

    Thanks,

    Mohit

  • Posted 23 September 2019, 7:13 am EST

    Sure thank! I’ll try with the latest version.

Need extra support?

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

Learn More

Forum Channels