this.Close() Syncfusion.Windows.Forms.Grid.Grouping.GridVisibleColumnDescriptorCollection.get_Count() error

Hello,

I need to recreate the scenario

1. I click on the Form menu

2. I click on the Form3 menu [open Form3]

3. I click Show Form2 button1

4. On Fom2, I double-click on the ggc record and transfers " tb_TRIGER_DOC_textBox.Text = selectedRecord["ProductID"].ToString()" works ok but I will mark it whether_to_close_the_form_checkBox1.Checked == true an error occurs at

Syncfusion.Windows.Forms.Grid.Grouping.GridVisibleColumnDescriptorCollection.get_Count() at Syncfusion.Windows.Forms.Grid.Grouping.GridVisibleColumnDescriptorCollectionEnumerator..ctor(GridVisibleColumnDescriptorCollection collection) .....


 how to close Form2 so that it does not report an error

please help Gregory


Attachment: TEST_MIDI_MENUS_dad37aba.rar

6 Replies

MS Malini Selvarasu Syncfusion Team July 18, 2024 01:01 PM UTC

Hi Gregory Pe,

Based on the information provided, we are able to replicate the issue on our end. We need more time to validate the issue at the source level. In the meantime, we require some additional details regarding your reported scenario. Based on the provided sample, we suspect you have used the 16.3450.0.29 Syncfusion product version.

Could you please confirm the Syncfusion product version utilized in your application?

This information will help us with further analysis and enable us to provide you with a solution at the earliest. Thank you for your cooperation and understanding.

Regards,

Malini Selvarasu



GP Gregory Pe July 18, 2024 01:52 PM UTC

Hi Malini

I confirm 16.3450.0.29.

Gregory



MS Malini Selvarasu Syncfusion Team July 19, 2024 01:04 PM UTC

Hi Gregory Pe,

We have checked the reported issue "Null Reference Exception thrown when closing the Form with the TableControlCellDoubleClick event" on our end and it is confirmed as a defect. And We have logged a bug. We will fix this issue and include it in our NuGet release Which is scheduled on Aug 06, 2024.

You can track the status of this report through the following feedback link,

FeedBack Link: Null reference exception thrown while closing the Form containing the GGC on TableControlCellDoubleClick event in WinForms | Feedback Portal (syncfusion.com)


Note: The provided feedback link is private, and you need to log in to view this feedback.

We will let you know once it is released. We appreciate your patience until then.

Note: We would like to clarify that the version you are currently using (16.3450.0.29) is no longer actively supported as per our product life cycle. We strongly recommend that you upgrade to the latest version. We have attached the product life cycle page for your reference. Kindly refer the below link:

Product life cycle page Link: Product Development Life Cycle for Essential Studio | Syncfusion


Disclaimer: Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.


Regards,

Malini Selvarasu




MS Malini Selvarasu Syncfusion Team August 6, 2024 12:07 PM UTC

Hi Gregory Pe,
We would like to let you know that Essential Studio Weekly NuGet packages (v26.2.8) has been published in nuget.org with the fix for the issue “Null Reference Exception thrown when closing the Form with the TableControlCellDoubleClick event”. Please let us know if you have any concerns in this.
Root Cause Details:
The reported problem occurs when the parent control (e.g., Form) is disposed by using an event from a child control (e.g., GridGroupingControl). We have resolved this issue by verifying whether the control is disposed or not before proceeding with mouse operations.
Additionally, it is necessary to cancel the TableControlCellDoubleClick event before closing the form. Please find the code snippet and sample attachment.
Code snippet:
private void GGC_0_gridGroupingControl_TableControlCellDoubleClick(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCellClickEventArgs e)
{
          --------------------------------------------------------------------
          if (whether_to_close_the_form_checkBox1.Checked == true)
        {
           try
              {
                    product_gridGroupingControl.TableControl.CurrentCell.EndEdit();
                    e.Inner.Cancel = true;
                    this. Close();
                }
               catch (Exception ex)
               {
                      MessageBox.Show("Error :" + ex);
                }
          }
}

Regards,
Malini Selvarasu

Attachment: GridGroupingControl_c383a2b1.zip


GP Gregory Pe August 6, 2024 04:38 PM UTC

Thank you and best regards

Gregory



MS Malini Selvarasu Syncfusion Team August 7, 2024 06:02 AM UTC

Hi Gregory Pe,

We are glad that your query was addressed. If you have any other queries, please create a new ticket. We are closing this forum.

Regards,

Malini Selvarasu


Loader.
Up arrow icon