This is a migrated thread and some comments may be shown as answers.

Custom Cell Editor with datasource

13 Answers 309 Views
Spreadsheet
This is a migrated thread and some comments may be shown as answers.
Phani
Top achievements
Rank 1
Phani asked on 01 Jun 2017, 02:01 PM

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

13 Answers, 1 is accepted

Sort by
0
Nencho
Telerik team
answered on 05 Jun 2017, 11:28 AM
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 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 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 (charts) and form elements.
0
Phani
Top achievements
Rank 1
answered on 10 Jul 2017, 02:51 PM

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

0
Nencho
Telerik team
answered on 12 Jul 2017, 12:06 PM
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.
0
Michelle
Top achievements
Rank 1
answered on 28 Jul 2017, 02:10 AM
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.
0
Michelle
Top achievements
Rank 1
answered on 28 Jul 2017, 02:11 AM
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.
0
Nencho
Telerik team
answered on 31 Jul 2017, 11:34 AM
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.
0
Michelle
Top achievements
Rank 1
answered on 01 Aug 2017, 11:53 PM
Thanks for the example.  I noticed that you used the call sheet.activeCell(), which is not documented anywhere in the API right now.
0
Nencho
Telerik team
answered on 03 Aug 2017, 08:48 AM
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.
0
Michelle
Top achievements
Rank 1
answered on 03 Aug 2017, 07:17 PM
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.
0
Ianko
Telerik team
answered on 07 Aug 2017, 10:41 AM

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.
0
Smita
Top achievements
Rank 1
answered on 04 Feb 2020, 10:54 AM

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

0
Ianko
Telerik team
answered on 05 Feb 2020, 07:45 AM

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.
0
Smita
Top achievements
Rank 1
answered on 05 Feb 2020, 11:56 AM
Ok, Thank you Lanko. 
Tags
Spreadsheet
Asked by
Phani
Top achievements
Rank 1
Answers by
Nencho
Telerik team
Phani
Top achievements
Rank 1
Michelle
Top achievements
Rank 1
Ianko
Telerik team
Smita
Top achievements
Rank 1
Share this question
or