Highlighted
Outstanding Contributor.
Outstanding Contributor.
1022 views

Error rewriting a datagrid

Jump to solution

Hello,

I have a datagrid with a sub-datagrid where the data of the sub-datagrid are displayed when I click on one of the main lines datagrid (Figure 1).
When I change (for example) the type of document to consult, the application has to re-record the data from datagrid and sub-datagrid.
Then gives the error "NullReferenceException was unhandled".

I'm using the same instructions I use with a simple datagrid and can not correct the error.

Again I ask your help.

Figure 1

Figure 2

Best Regards

Alberto Ferraz

0 Likes
2 Solutions

Accepted Solutions
Highlighted
Outstanding Contributor.
Outstanding Contributor.

RE: Error rewriting a datagrid

Jump to solution

Hi Alberto

What happens when you are coding something like this:

   set custGrid::ItemsSource to null

   *>  processing for setup new custList      

   set custGrid::ItemsSource to custList

Regards

Werner Lanter

View solution in original post

0 Likes
Highlighted
Outstanding Contributor.
Outstanding Contributor.

RE: Error rewriting a datagrid

Jump to solution

Hi Werner,

Thanks for your response.

Again the solution is perfect. Already implemented and no longer gives me the error.

I was using the "invoke custGrid :: Items :: Clear ()" statement.

A simple datagrid works well but this not with a sub-datagrid.

Thanks again.

Best regards

Alberto Ferraz

View solution in original post

0 Likes
3 Replies
Highlighted
Outstanding Contributor.
Outstanding Contributor.

RE: Error rewriting a datagrid

Jump to solution

Hi Alberto

What happens when you are coding something like this:

   set custGrid::ItemsSource to null

   *>  processing for setup new custList      

   set custGrid::ItemsSource to custList

Regards

Werner Lanter

View solution in original post

0 Likes
Highlighted
Outstanding Contributor.
Outstanding Contributor.

RE: Error rewriting a datagrid

Jump to solution

Hi Werner,

Thanks for your response.

Again the solution is perfect. Already implemented and no longer gives me the error.

I was using the "invoke custGrid :: Items :: Clear ()" statement.

A simple datagrid works well but this not with a sub-datagrid.

Thanks again.

Best regards

Alberto Ferraz

View solution in original post

0 Likes
Highlighted
Outstanding Contributor.
Outstanding Contributor.

RE: Error rewriting a datagrid

Jump to solution

Hi Werner:

Thanks for your response.

I've applied this instruction and the program no longer gives error when you change one of the selection parameters.

I was using the "invoke custGrid :: Items :: Clear ()" statement.

A simple datagrid works well but this not with a sub-datagrid.

Thanks again.

Best regards

Alberto Ferraz

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.