Edit Template

I was working with inline editing using the edit template. My Edit Template will have a Label that shows the information of the column, and a button that will open a custom dialog in order to select the data, this dialog has a callback that will return the selected Data. The Dialog Component won't be inside the template, because it is not only needed on one column and also because the styles of the rows that are not being edited overlaps my dialog(tried to fix that with CSS, it didn't work).so after selecting the data on that dialog, the column doesn't show the selection that I made, it only works once I call the EndEdit method, which is something that I don't want because I need to keep editing the other columns.
I pass the context on the call back so I can edit it after selecting the data on my dialog, but I don't know how to let know the grid that the context is now changed.


            <GridColumn Field=@nameof(Item.TypeCode)
                                          Width="190">
                <EditTemplate>
                    @{
                        var rowinfo = (context as LineItem);
                    }
                    <div class="d-flex flex-row justify-content-center align-items-center">
                        <div class="body-1">
                            @rowinfo!.TypeCode
                        </div>
                        <ButtonIcon  IconName="search" OnClickCallback="() => OpenDialong(rowinfo)"></ButtonIcon>
                    </div>
                </EditTemplate>
            </GridColumn >


@code{

public void OpenDialog(TypeCode row)
{
     SelectedRow = row;
     _typeDialog.ShowDialog();
}
}

1 Reply

VN Vignesh Natarajan Syncfusion Team April 20, 2021 06:13 AM UTC

Hi Christopher,  
 
Thanks for contacting Syncfusion support.  
 
Query: “I pass the context on the call back so I can edit it after selecting the data on my dialog, but I don't know how to let know the grid that the context is now changed 
 
We understand that you are facing difficulties in showing the selected value from dialog in Grid edit form. But we need some more details about the requirement. So kindly share the following details.  
 
  1. Share the entire Grid code example.
  2. Share the details about the dialog component show in Edit template button click. How data is displayed in dialog and selected?
  3. Share the video demonstration of the issue.
  4. If possible share a simple issue reproducible sample.
 
Above requested details will be very helpful for us to validate the reported query at our end and provide better solution as early as possible.   
 
Regards, 
Vignesh Natarajan 


Loader.
Up arrow icon