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

[Solved] Editing Inline Records with specific fields.

0 Answers 18 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Moid
Top achievements
Rank 1
Moid asked on 20 Apr 2011, 11:14 AM


Its been great using Telerik MVC controls, although im unable to find a way to have specific columns while doing inline editing inside telerik grid. How can i have some specific columns for it. Plus i need to change the layout for the form fields appearing in popup mode. Code is given below

Model Person has eight fields and only 4 are required to be shown while Editing in Telerik Grid.

// Code Start 
 @(Html.Telerik().Grid(Model)
                .Name("Grid")
                .DataKeys(keys => keys.Add(o => o.PersonID))
                .ToolBar(commands => commands.Insert())
                .DataBinding(dataBinding => dataBinding
                .Server()
                    .Insert("Create", "Home")
                    .Update("Details", "Home")
                    .Delete("Delete", "Home"))
                .Columns(columns =>
                {
                    columns.Bound(o => o.PersonID).Width(400);
                    columns.Bound(o => o.FirstName).Width(200);
                    columns.Bound(o => o.LastName);
                    columns.Bound(o => o.UserName);
                    columns.Command(commands =>
                    {
                        commands.Edit().ButtonType(GridButtonType.Text);
                        commands.Delete().ButtonType(GridButtonType.Text);
                    }).Width(200);
                })
                .Groupable()
                .Sortable()
                .Pageable()
                .Filterable()
                .Editable(editing => editing.Mode(GridEditMode.PopUp))
                
                )


Tags
Grid
Asked by
Moid
Top achievements
Rank 1
Share this question
or