Hi Belle,
Greetings from Syncfusion support.
We are not clear about exact issue or the scenario you are facing the issue. We need the following details to further proceed on this scenario. Kindly get back to us with the following details for better assistance.
The provided information will help us analyze the problem, and provide you a solution as early as possible.
Regards,
Renjith R
Hi Belle,
Thanks for the update.
We have checked your shared codes and we could see that you have rendered multiple grids inside tabs. We suspect that the reported issue occurs when we perform operation in GridDetail2 will make a call to the ComputeDetail method at that time the instance of grid 1 (GridDetail1) will be null. So the null reference exception is thrown when trying to get current view records.
Kindly check whether the GridDetail1 instance is non null before accessing. Kindly check the attached code snippet for your reference.
|
public async Task ComputeDetail() { AllowSelection = false;
//TotalBalance = CPHeaderEdit.CheckAmount - TotalAmountPaid;// August 1, 2022 //await GridDetail1.UpdateCell(RowIndexDetail, "Balance", TotalBalance);// August 1, 2022
AllowSelection1 = true;
TotalAmountPaid = 0;
TotalBalance = 0;
CheckBalance = 0; if (GridDetail1 != null) {
//Sales Invoice UnChanged.Clear(); var ChangedData1 = await GridDetail1.GetBatchChangesAsync(); //get batch changes var CurrentView1 = await GridDetail1.GetCurrentViewRecordsAsync(); // get current view data
|
If the reported issue still persist or if we misunderstood your query then kindly share the below details to validate further at our end.
The above-requested details will be very helpful for us to validate the reported query at our end and provide the solution as early as possible.
Regards,
Monisha
Hi Belle,
Thanks for the update.
We have checked your shared codes and we could see that you have rendered multiple grids inside tabs. We suspect that the reported issue occurs when we perform operation in GridDetail2 will make a call to the ComputeDetail method at that time the instance of grid 1 (GridDetail1) will be null. So the null reference exception is thrown when trying to get current view records.
Kindly check whether the GridDetail1 instance is non null before accessing. Kindly check the attached code snippet for your reference.
|
public async Task ComputeDetail() { AllowSelection = false; //TotalBalance = CPHeaderEdit.CheckAmount - TotalAmountPaid;// August 1, 2022 //await GridDetail1.UpdateCell(RowIndexDetail, "Balance", TotalBalance);// August 1, 2022 AllowSelection1 = true; TotalAmountPaid = 0; TotalBalance = 0; CheckBalance = 0; if (GridDetail1 != null) { //Sales Invoice UnChanged.Clear(); var ChangedData1 = await GridDetail1.GetBatchChangesAsync(); //get batch changes var CurrentView1 = await GridDetail1.GetCurrentViewRecordsAsync(); // get current view data |
If the reported issue still persist or if we misunderstood your query then kindly share the below details to validate further at our end.
The above-requested details will be very helpful for us to validate the reported query at our end and provide the solution as early as possible.
Regards,
Monisha
If this post is helpful, please consider Accepting it as the solution so that other members can locate it more quickly.