This is a migrated thread and some comments may be shown as answers.
VB Syntax for .Editable(False)
1 Answer 4 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Alex asked on 18 Jun 2020, 01:02 PM

Hi, I'm new in Telerik and currently using for my code. Can someone help to convert the below code to vb in vbhtml?

.DataSource(dataSource =>
    dataSource.Ajax().Read("AjaxInitGrid", "Shared").Model(model =>
        model.Id(p => p.ID);
        model.Field(p => p.CreationDate).Editable(false);
           model.Field(p => p.BirthDate).Editable(false);


I not able to convert model.Field(p => p.CreationDate).Editable(false) to vb.



1 Answer, 1 is accepted

Sort by
Telerik team
answered on 22 Jun 2020, 09:47 AM

Hi Alex,

The following snippet shows how to declare the model in VB and set Editable false to a field:

        Html.Kendo().Grid(Of OrderViewModel)() _
            .Name("grid") _
                         columns.Bound(Function(p) p.OrderID).Filterable(False)
                         columns.Bound(Function(p) p.Freight)
                         columns.Bound(Function(p) p.OrderDate).Format("{0:MM/dd/yyyy}")
                         columns.Bound(Function(p) p.ShipName)
                         columns.Bound(Function(p) p.ShipCity)
                     End Sub) _
            .Pageable() _
            .Editable(Sub(ed) ed.Mode(GridEditMode.InCell)) _
            .Sortable() _
            .Scrollable() _
            .Filterable() _
            .HtmlAttributes(New With {.style = "height:550px;"}) _
                            dataSource _
                            .Ajax() _
                            .PageSize(20) _
                            .Read(Function(read) read.Action("Orders_Read", "Grid")) _
                                       m.Id(Function(i) i.OrderID)
                                       m.Field(Function(p) p.OrderDate).Editable(False)
                                   End Sub)
                        End Sub) _
    End Code

I added such a line in our VB syntax example for Grid as well and it should be live soon.

Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question