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

[Solved] Make Single Column Uneditable

2 Answers 149 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Chillie
Top achievements
Rank 1
Chillie asked on 29 Jul 2012, 08:40 PM
I am much of a newbie, and apologize in advance for being stupid.  I have built a grid that utilizes a php script and json conversion to pull source data from a database.  It works perfectly.  However I want to make the first column of this grid (branch), where it cannot be edited. My successful code for editing "all" fields is listed below, but I've been unable to locate in the forums how to pull off making one column non-editable using a database as source data.  Thanks in advance for you help and patience. 

<div id="grid"></div> <script>
        $(function() {
            $("#grid").kendoGrid({
                dataSource: {
                    transport: {
                        read: "../grids/branchgrid.php"
  },
                    schema: {
                        data: "data"                                                                                                         
                      }
                },
                        height: 400,
                        filterable: true,
                        sortable: true,
reorderable: true,
                        resizable: true,
                        pageable: false,
columnMenu: true,
editable: true,
toolbar: ["create", "save", "cancel"],
columns: [{field: "branch", title: "Government Branch", width: 200 }, 
       {field: "description", title: "Description" },
{field: "disable", title: "Disabled", width: 100 },
{ command: "destroy", title: "&nbsp;", width: 110 } ]

                    });
                });
                             
            </script>

2 Answers, 1 is accepted

Sort by
0
Kris
Top achievements
Rank 1
answered on 08 Feb 2015, 11:30 AM
Hi Chillie,

Were you able to find a solution for this issue as I want to achieve the same behavior?

Thanks,
Kris
0
Kiril Nikolov
Telerik team
answered on 12 Feb 2015, 07:51 AM

Hello Kris,

I would suggest you to check the following forum topic and see the proposed solution there:

http://www.telerik.com/forums/how-to-make-a-non-editable-column-field

Regards,
Kiril Nikolov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Chillie
Top achievements
Rank 1
Answers by
Kris
Top achievements
Rank 1
Kiril Nikolov
Telerik team
Share this question
or