Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to add firld validation in inline editing of kendo grid
below is my kendo grid

C#
@(Html.Kendo().Grid(Model)
    .Name("gridLLPType")
    .Columns(columns =>
    {

        columns.Bound(p => p.ProviderType).Title("Type").Width(150);
        columns.Bound(p => p.ProviderTypeName).Title("Type Name").Width(150);
        columns.Bound(o => o.Provider_Type_Status).ClientTemplate("# if( Provider_Type_Status == true) {  # Active #   } else { #  InActive # } #")
            .Filterable(filterable => filterable.Messages(m => m.IsFalse("InActive"))
            .Messages(m => m.IsTrue("Active")))
            .Title("Status").Width(80);
  
            columns.Command(command => command.Edit()).Width(200);
      
    })

    .Editable(editable => editable.Mode(GridEditMode.InLine))
    .Sortable()
    .Scrollable()
     .Filterable(filter =>
                    {

                        filter.Operators(f => f.ForString(o =>
                        {
                            o.Clear();
                            o.Contains("Contains");
                            o.DoesNotContain("Does Not Contain");
                            o.IsEqualTo("Is Equal To");
                            o.IsNotEqualTo("Is Not Equal To");
                            o.StartsWith("Starts With");
                            o.EndsWith("Ends With");
                        }));
                    })
    .DataSource(dataSource => dataSource
        .Ajax()
        // // .PageSize(15)
        .ServerOperation(false)
        .Model(model => model.Id(p => p.Provider_Type))
       //.Events(events => events.RequestEnd("OnRequestEnd_gridLLPType"))
        .Read(read => read.Action("LLPTypeMasterRead", "NewMasterData", new { area = "AreaMasterData" }))
        .Create(update => update.Action("AddLLPProviderType", "NewMasterData", new { area = "AreaMasterData" }))
        .Update(update => update.Action("UpdateLLPProviderType", "NewMasterData", new { area = "AreaMasterData" }))

    )
)



i have to add validation for ProviderTypeName as manadatory field .

please help me ....
Posted

1 solution

There is a working example here: Custom Validation example for Kendo UI Grid widget[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900