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

3 posts, 0 answers
  1. Navanath
    Navanath avatar
    1 posts
    Member since:
    Sep 2013

    Posted 26 Dec 2018 Link to this post

    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. David
    David avatar
    116 posts
    Member since:
    Jan 2011

    Posted 26 Dec 2018 in reply to Navanath Link to this post

    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....

     

  3. Viktor Tachev
    Admin
    Viktor Tachev avatar
    2148 posts

    Posted 27 Dec 2018 Link to this post

    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.
Back to Top