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

Kendo Grid with Datetime,Number,text field value in same column

2 Answers 84 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Navanath
Top achievements
Rank 1
Navanath asked on 26 Dec 2018, 01:39 PM

Hi Team,

I have requirement where i want editable kendo grid in which i have one column  (Values) in which i want to show the date ,number and text values.depending on the datatye it should change control of that cell accourding to datatype of that value .i'm able to show these value but at the time of editing i facing issue like values are not visible in the cell something like that if i forced column type either to string or datetime,

please suggest some working example 

 

Thanks in advance.

2 Answers, 1 is accepted

Sort by
0
David
Top achievements
Rank 1
Veteran
answered on 26 Dec 2018, 06:54 PM

Let me make a suggestion to you.  What you are really saying, if I restate what I believe you to be asking, is that you wish to have a variable format editor based upon content.   In theory you want the user to be able to click on a given element and the correct editor be shown / used.

Have you investigated the usage of a custom Model Editor?  That should give you what you are looking for.  You can then bind to the grid and tell it to use your model editor instead of the normal default editor templates.  That is one of the nice features of MVC....

 

0
Viktor Tachev
Telerik team
answered on 27 Dec 2018, 11:29 AM
Hi Navanath,

Using different editors in the same column is not a built-in feature. Furthermore, such functionality is not recommended. This implies that the underlying data will be stored as a string. As a result an extensive custom logic will be required for validating and reading the data and parsing it to the correct type. 

In order to take advantage of the built-in features of the components I will strongly recommend modifying the data in a way that each different data type is stored in a separate field. This way, the editing, filtering, sorting, etc. features will work out of the box with no need of complex custom logic.

Regards,
Viktor Tachev
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.
Tags
General Discussions
Asked by
Navanath
Top achievements
Rank 1
Answers by
David
Top achievements
Rank 1
Veteran
Viktor Tachev
Telerik team
Share this question
or