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

sfgrid refreshing when i click on add button to add new row

hello
in sfgrid when i click on add button to add new row sfgrid fire refresh action and add form not showing and when i again click on add button the form appears

REQUIREMENT:
i have 3 grids my second and third grid will update when i click on its parent (previous) grid row and i am using browserLocalstorage with JS interop so i use OnAfterRenderAsync(bool firstargumrnt) event
NOTE: also check attachments for better understanding

public List<TItem>? GivenDataOne { get; set; }
protected override async Task OnAfterRenderAsync(bool first)
{
if(ActionState == "Add" || ActionState == "Save")
{
return;
}else{
if(GivenDataOne.Count() == 0 ){
GivenDataOne = await HttpService.Get<TItem>(url,token)
}
}


Attachment: ButtonClickImages_c5870c3f.zip


1 Reply

MS Monisha Saravanan Syncfusion Team April 13, 2023 12:48 PM UTC


Hi Ali Aqdas,


Before proceeding further with your requirement. We need some more clarifications at your end. So kindly share below details to validate the issue further from our side.


  • Share us the entire Grid code snippet.
  • Share us the way you have handled the Add operation in the second DataGrid while clicking the row from the first Grid.
  • Also we would like to inform that we have AddRecordAsync method in DataGrid. We can use that method to add an record in particular Grid.
  • Or kindly try refreshing the Grid after performing click in the toolbar.
  • Share us the video demonstration of the issue.
  • If possible share us simple issue reproducing sample or try to reproduce the reported issue on the above sample


The above provided details will be very helpful for us to validate the reported query at our end and provide the solution as early as possible also Kindy get back to us if you need further assistance


Regards,

Monisha


Loader.
Live Chat Icon For mobile
Up arrow icon