We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How change value in cell in parent grid?

 I using grid inside grid() 

 <GridTemplates>

            <DetailTemplate>

.......

            </DetailTemplate>

 </GridTemplates>

Exist method SetCellValueAsync method but it collapsed child grid. How I can change value in parent grid not hide childe grid?

            


1 Reply

MS Monisha Saravanan Syncfusion Team February 17, 2023 12:48 PM UTC

Hi Kavit,


Greetings from Syncfusion support.


We suspect that your requirement is to expand the detail row even if the parent Grid is updated. We would like to inform that when we perform edit in parent Grid then the detail template will moves to collapsed state and this is the default behavior of DataGrid. Also we would like inform that we have an inbuilt method, ExpandCollapseDetailRowAsync that allows you to expand and collapse the detail row by passing in the particular row data as a parameter. We have attached a code snippet for your reference, which should make it easy for you to implement this feature in your application.


So you can call this method after updating the data using SetCellValueAsync method.


 

await Grid.ExpandCollapseDetailRowAsync(Data); // pass the row data

 



Reference: https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.SfGrid-1.html#Syncfusion_Blazor_Grids_SfGrid_1_DetailExpandCollapseRow__0_


We hope this information is helpful and resolves any concerns you may have had. Please don't hesitate to reach out to us if you have any further questions or need additional assistance.


Loader.
Up arrow icon