Custom Cell Editor with datasource

14 posts, 0 answers
  1. Phani
    Phani avatar
    12 posts
    Member since:
    May 2013

    Posted 01 Jun 2017 Link to this post

    Hi there, could you provide me an example of a drop down cell editor (all cells in a column) where the dropdown is bound to a datasource. 

    Thanks in advance!

    Phani

  2. Nencho
    Admin
    Nencho avatar
    1871 posts

    Posted 05 Jun 2017 Link to this post

    Hello Phani,

    I am afraid that at the time being, you can only define a string (comma separated values) to which the list could bind to. You can still use a kendo DataSource object, but you should manually concatenate its dataItems, in order to create such string and supply the editors with it.

    The other option that you have is to use the custom editor and place a DropDown in the window. Then you can set the preferable datasource for this editor:

    http://dojo.telerik.com/@nenchef/ojEWU/3


    Hope this would help.

    Regards,
    Nencho
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Phani
    Phani avatar
    12 posts
    Member since:
    May 2013

    Posted 10 Jul 2017 Link to this post

    Hi Nencho, Is there a way to prevent the users from typing anything in the cell that has a dropdown? I want to let the uses only select a value from dropdown and not be able to type anything.

     

    Thank you!

    Phani

  4. Nencho
    Admin
    Nencho avatar
    1871 posts

    Posted 12 Jul 2017 Link to this post

    Hello Phani,

    You can achieve this, by hooking a keydown event and determine whether the target cell is the one with the editor. Then you can prevent any keydown event:

    http://dojo.telerik.com/@nenchef/ojEWU/8


    Please note that the above suggested implementation is not supported with the Spreadsheet by design and any enhancement are not supported.

    Hope this would help.

    Regards,
    Nencho
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  5. Michelle
    Michelle avatar
    46 posts
    Member since:
    Feb 2015

    Posted 27 Jul 2017 Link to this post

    Is there anyway to prevent the cursor from going into the cell at all?  It is very confusing that you're able to enter the cell, but you can't type anything.
  6. Michelle
    Michelle avatar
    46 posts
    Member since:
    Feb 2015

    Posted 27 Jul 2017 Link to this post

    Is it possible to prevent the cursor from entering the cell altogether?  It is confusing to the user why typing doesn't work even when the cursor is right there in the cell.
  7. Nencho
    Admin
    Nencho avatar
    1871 posts

    Posted 31 Jul 2017 Link to this post

    Hello Michelle,

    In order to achieve the desired functionality, you should simply subscribe for the dblclick event as well as for the keydown. I have updated the previously provided example, which you can find below:

    http://dojo.telerik.com/@nenchef/ojEWU/9

    Hope this would help.

    Regards,
    Nencho
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  8. Michelle
    Michelle avatar
    46 posts
    Member since:
    Feb 2015

    Posted 01 Aug 2017 Link to this post

    Thanks for the example.  I noticed that you used the call sheet.activeCell(), which is not documented anywhere in the API right now.
  9. Nencho
    Admin
    Nencho avatar
    1871 posts

    Posted 03 Aug 2017 Link to this post

    Hello Michelle,

    The referenced method is listed in our API documentation:

    http://docs.telerik.com/kendo-ui/api/javascript/ui/spreadsheet#configuration-sheets.activeCell

    Indeed, currently there is no example, but we will address this feedback and soon there will be added.

    Regards,
    Nencho
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  10. Michelle
    Michelle avatar
    46 posts
    Member since:
    Feb 2015

    Posted 03 Aug 2017 Link to this post

    Actually I was not looking under the Configuration section at all, so I didn't see that.  Shouldn't it be listed under Methods?  It is a function on the Sheets object.  It is not a string property as the documentation says.
  11. Ianko
    Admin
    Ianko avatar
    1938 posts

    Posted 07 Aug 2017 Link to this post

    Hello Michelle,

     

    Thank you for that remark. We will make sure to include the activeCell method in the API reference of the kendo.spreadsheet.Sheet class as well. 

     

    Regards,
    Ianko
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  12. Smita
    Smita avatar
    5 posts
    Member since:
    Nov 2019

    Posted 04 Feb Link to this post

    Hello,

    I am using custom cell editor in kendo spreadsheet, but if I add content to the cell and clicked on custom cell editor for that cell then

    previous content typed in cell is vanished

    Is there any solution to preserve previous content

  13. Ianko
    Admin
    Ianko avatar
    1938 posts

    Posted 05 Feb Link to this post

    Hi Smita,

    After debugging the case, it appears that this is a bug. Here you are the logged issue: https://github.com/telerik/kendo-ui-core/issues/5582.

    Regards,
    Ianko
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  14. Smita
    Smita avatar
    5 posts
    Member since:
    Nov 2019

    Posted 05 Feb in reply to Ianko Link to this post

    Ok, Thank you Lanko. 
Back to Top