Skip to main content
Dominique Sacre
Rocketeer
Feb 15, 2013 10:41 PM UTC

In the .Net DataGridView control how can you clear all elements in the Grid ?

Problem:

In the .Net DataGridView control how can you clear all elements in the Grid ?

The datagrid view allows you to display a grid show many items of Information. In COBOL how can you clear out all items from the grid.

Resolution:

The "Items" property of the Grid Control contains a collection of the rows in the grid.

You can use:-

           invoke dataGridView1::"Rows"::"Clear"

to empty out the grid control.

Old KB# 3893