Highlighted
Outstanding Contributor.
Outstanding Contributor.
710 views

Error in a DataGrid

Jump to solution

Hello:

I have an event in datagrid (method-id dgridRubricas_MouseDoubleClick) that works perfectly when I click with the mouse in a cell.

It turns out that when I click the mouse on the scroll bar to move down to the remaining data visualization, and make very fast, is considered a MouseDoubleClick and gives the following error "Null Reference Exception was unhandled".

What is the solucção to prevent this situation?

Best Regards

Albeto Ferraz

0 Likes
1 Solution

Accepted Solutions
Highlighted
Outstanding Contributor.
Outstanding Contributor.

RE: Error in a DataGrid

Jump to solution

Hallo

Here my solution in a WPF program:

      method-id KontoGrid_MouseDoubleClick.

      procedure division using by value sender as type Object

                               by value e as type System.Windows.Input.MouseButtonEventArgs.

          set KomtoItem to KontoGrid::Items::CurrentItem as type xyz

          if KontoItem = null

             goback

          end-if

          *> do processing

          goback.

      end method.

Regards

Werner Lanter

View solution in original post

0 Likes
2 Replies
Highlighted
Outstanding Contributor.
Outstanding Contributor.

RE: Error in a DataGrid

Jump to solution

Hallo

Here my solution in a WPF program:

      method-id KontoGrid_MouseDoubleClick.

      procedure division using by value sender as type Object

                               by value e as type System.Windows.Input.MouseButtonEventArgs.

          set KomtoItem to KontoGrid::Items::CurrentItem as type xyz

          if KontoItem = null

             goback

          end-if

          *> do processing

          goback.

      end method.

Regards

Werner Lanter

View solution in original post

0 Likes
Highlighted
Outstanding Contributor.
Outstanding Contributor.

RE: Error in a DataGrid

Jump to solution

Hello,

Your solution is the perfect solution and solved my error.

Thanks.

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.