Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 73760

AX 2012 - Grid lines - Filter records and select all the filtered records

$
0
0

Hi,

i have a new grid i've done, with a button that selects all the records in the grid.

If i filter records with CTRL+G function and then i push the "select all" button,

it doesnt select the filtered records, but it selects all the records that were previously retrieved from the init query of the form.

The code of select all button is:

void clicked()

{

   QueryRun    queryRun;

   InventTrans InventTransds;

   ;

   super();

   queryRun = new QueryRun(InventTrans_1_q);

   queryRun.query().dataSourceTable(tableNum(InventTrans)).addSelectionField(fieldNum(InventTrans, Recid));

   while (queryRun.next())

   {

       InventTransds = queryRun.get(tableNum(InventTrans));

       InventTransSet.add(InventTransds.recid);

   }

   InventTrans_1_ds.research();

}

How can i make my button select only the filtered records?

Is there a standard form with the same  behavior?

Thank you in advance

regards


Viewing all articles
Browse latest Browse all 73760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>