we try to make the detail state persitent. you already answered how to do this in a few questions (ref and ref2 ). we still miss one thing: how to prevent the rendering between refresh and ondatabound call ?
we already tried to set PreventRender to true in OnActionBegin but this doesnt help. our goal is to prevent any rendering before restoring the detail row state
Greetings from Syncfusion support.
We would like to inform that by setting args.cancel as true will prevent the inbuilt operation. Here we have used ActionBegin event of DataGrid and by using the request type as Save we have prevented the inbuilt operation. Kindly check the attached code snippet and documentation for your reference.
public async Task DataBoundHandler (ActionEventArgs<Order> args)
if(args.RequestType == Syncfusion.Blazor.Grids.Action.Save && IsSave)
args.Cancel = true;
Please let us know if you have any concerns.
thanks for your suggestion - could you provide a full example ? we dont get it to work with the provided informations.
OnActionBegin is never called with "Syncfusion.Blazor.Grids.Action.Save", only with refresh.
we are not talking about editing the data itself, the data source changed from outside and so a data bound and refresh is triggered
we provided an example with out persistent details module. if you click a few times on ChangeData button, you should see the flickering ( this get worse with more data )
We apologize for the delay and any inconvenience you may have experienced. After reviewing your sample, we have determined that when you use the "changedata" button, it updates the data in the grid component at runtime, causing the component to rerender. This may result in flickering when you click the "changedata" button. To address this issue, we suggest avoiding the use of the task delay method, as it may also contribute to the problem. If you have any further questions or concerns, please do not hesitate to reach out to us. We are here to assist you.
The delay function is just to simulate a time consuming function call like requesting the database…
so you say that this flickering can’t be prevented ?
do you have any other approach that to restore the detail expand state after data has updates without flickering ?
We would like to inform you that, we were unable to prevent the flickering, in that meantime we’ll render the spinner when some data operation running in the background. This is the default behavior.
Please get back to us, if you have any concern.
Well then its a bug isnt it ?
setting PreventRender to true inside OnDataBound should prevent all rendering but its still render as if the parameter has no effect
Sorry for the delay and inconvenience cause.
We would like to inform you that the PreventRender property is used to internally overrides the ShouldRender method of the grid to prevent re-rendering. OnDataBound event occurs before data is bound to DataGrid, but the ShouldRender method isn’t executed at the first-time component rendered. This is how the PreventRender method behaves.
If you have any further queries, please get back to us