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

Grid row different Editor base on column value

1 Answer 92 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Prashant
Top achievements
Rank 1
Prashant asked on 07 Dec 2018, 08:15 PM

Hi- I came across knowledge base article (https://docs.telerik.com/kendo-ui/knowledge-base/grid-different-editor-based-on-column-value). I'm looking for same functionality to implement in my project. I have master Detail grid with Inline Add, Edit and delete functionality. I'm looking for different editor base column in detail section of grid. User will select AttributeName  and depending upon type of AttributeName, value column editor will get change run time. User can also ADD, EDIT and DELETE rows. Attach Screen Shot

Any sample code, ideas and/or thoughts would be great and most appreciated!

Functionality :-

1) Master Detail Grid

2) Inline editable (Add, Edit and delete)

3) different editor base column in detail section of grid

Data Example:-

var Data = [
    {
        "LR_Name": 'Long Term',
        "LRVR_Opt_To_Decline": 'Y',
        "LRVR_Required": 'Y',
        "LPVR_Active": 'Y',
        "Attributes": {
            "Attribute": [
                {
                    "Name": "ABR Duration",
                    "Value": "2",
                    "Type": 'dropdown'

                },
                {
                    
                    "Name": "EBR Duration",
                    "Value": "2",
                    "Type": 'Number'
                    
                }
            ]

        }
    },
    {
        "LR_Name": 'LTCR',
        "LRVR_Opt_To_Decline": 'Y',
        "LRVR_Required": 'N',
        "LPVR_Active": 'N',
        "Attributes": {
            "Attribute": [
                {
                    "Name": "LTCR Supp Date",
                    "Value": "01-01-2018",
                    "Type": 'date'

                },
                {
                    
                    "Name": "LTCR Supp Amount",
                    "Value": "2500",
                    "Type": 'Currency'
                }
            ]

        }
    },
    {
        "LR_Name": 'Extended Benefit',
        "LRVR_Opt_To_Decline": 'Y',
        "LRVR_Required": 'N',
        "LPVR_Active": 'N',
        "Attributes": {
            "Attribute": [
                {
                   
                    "Name": "Benefit Type",
                    "Value": "5% Simple",
                    "Type": 'String'

                },
                {
                    
                    "Name": "Benefit",
                    "Value": "10% Simple",
                    "Type": 'String'
                }
            ]

        }
    }
];

1 Answer, 1 is accepted

Sort by
0
Alex Hajigeorgieva
Telerik team
answered on 11 Dec 2018, 03:36 PM
Hi, Prashant,

I have already responded to you in the private support thread that you have submitted but I will share my response here as well:

--------

It is possible to achieve the desired behaviour in the Kendo UI Grid by declaring a custom columns editor function:

https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/configuration/columns.editor

We have an article with a runnable example that you may follow at:

https://docs.telerik.com/kendo-ui/knowledge-base/grid-use-dynamic-editor

Should you face any difficulties, please feel free to get back to me.

-------

In the future, please refrain from submitting duplicate questions. This way we can provide you with clear and focused responses in a single thread. Thank you very much for your understanding in this manner.

Kind Regards,
Alex Hajigeorgieva
Progress Telerik
Get quickly 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
Grid
Asked by
Prashant
Top achievements
Rank 1
Answers by
Alex Hajigeorgieva
Telerik team
Share this question
or