System.NullReferenceException: Object reference not set to an instance of an object.

Hi All,
Getting following exception on Windows 10. Windows 8 all OK, but in Windows 10 I am facing the NulReference exception, What would be the issue ?

at Syncfusion.Windows.Forms.Grid.Grouping.GridGroupingControl.GetTableControl(String name)
at Syncfusion.Windows.Forms.Grid.Grouping.GridTableControl.OnCellTipsMouseMove(MouseEventArgs e)
at Syncfusion.Windows.Forms.Grid.Grouping.GridTableControl.OnMouseMove(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseMove(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at Syncfusion.Windows.Forms.ScrollControl.WndProc(Message& msg)
at Syncfusion.Windows.Forms.Grid.GridControlBase.WndProc(Message& msg)
at Syncfusion.Windows.Forms.Grid.Grouping.GridTableControl.WndProc(Message& msg)

Thanks and Regards,
Suresh

3 Replies

AA Arulraj A Syncfusion Team October 5, 2018 01:06 PM UTC

Hi Suresh, 
 
Thanks for using Syncfusion products. 
 
We tried to reproduce the reported issue but unable to get the mentioned NullReference issue. Please let us know your grid property settings and the Essential Studio version you are using. So that we can find the root cause and provide a solution. The following is the sample we tried to reproduce which is working fine as expected. 
 
Regards, 
Arulraj A 



AU aurelian January 9, 2024 08:24 AM UTC

hi.

I think i have approximately the same error.

I have the following code: 

"

private void GridTableProcessing(string tableName, string relationName)

{

    GridTable gridTable = gridGroupingControl.GetTable(tableName);

    if (gridTable != null)

    {

        RecordsInTableCollection recordsCollection = gridTable.Records;       

            for (int i = 0; recordsCollection != null && i < recordsCollection.Count; i++)

            {

                ChildTable childTable = gridTable.Records[i].GetRelatedChildTable(new RelationDescriptor(relationName));

                if (childTable != null)

                {

                    gridTable.Records[i].IsExpanded = childTable.Records.Count > 0;

                }

            }

    }

}

"

in my case, Records is not instantiated. 

In the application, i have a child table with records. When i put the currsor on a record from the child, i update, them i try to bring again the records, i receive: "'Object reference not set to an instance of an object.'" From what i see, The records is not instantiated. 

Image_8235_1704788686725



CM Chidanand Murugaiah Syncfusion Team January 10, 2024 01:34 PM UTC

Hi Suresh,


Based on the provided information we are unable to replicate the reported scenario. We prepared a sample with the provided information and called the GetTableProcessing method in the button click. It works properly as we expected. Could you please provide following details. 

    • Can you please provide a sample in which the issue replicates.
    • If possible, can you please replicate the issue in the sample which we have provided.
    • Could you provide the information about when and where you are calling GetTableProcessing method.


Providing these details will help us better understand the issue and work towards finding a solution promptly.


Regards,

Chidanand M.



Attachment: GridGroupingControl_Demo4_6_ed92777d.zip

Loader.
Up arrow icon