Editing TelerikGrid

1 Answer 112 Views
General Discussions Grid
Testuser
Top achievements
Rank 1
Testuser asked on 31 Mar 2023, 04:06 AM | edited on 31 Mar 2023, 06:27 AM

 

Is there a way to do in form editing in Telerik Grid for Blazor(TelerikGrid) like the one shown here for Telerik RadGrid?

https://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/edit-form-types/defaultcs.aspx
Dimo
Telerik team
commented on 04 Apr 2023, 10:24 AM

If the edit form should appear between table rows, it is possible to implement an edit form like this:

1 Answer, 1 is accepted

Sort by
0
swathi
Top achievements
Rank 1
Iron
answered on 11 Apr 2023, 08:32 AM
 <DetailTemplate>
                                                            @{
                                                                EmpData emp= context as EmpData;
                                                                <div class="row">
                                                                   //Add your form 
                                                                </div>
                                                            }
                                                        </DetailTemplate>

 TelerikGrid<EmpData> empGrid { get; set; }

private async Task OnEdit(bool value, EmpData empData)
    {

GridState<EmpData> desiredState = new GridState<EmpData>();

 

 isEdit=true;
        if (isEdit)
        {
            desiredState.ExpandedItems = new List<EmpData>
            {
                empData
            };
        }
        else
        {
            desiredState.ExpandedItems = null;
        }
        await empGrid.SetState(desiredState);

}

Tags
General Discussions Grid
Asked by
Testuser
Top achievements
Rank 1
Answers by
swathi
Top achievements
Rank 1
Iron
Share this question
or