Skip to main content

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

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

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


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

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


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

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