how to write methods in ListPages? i.e ProjProjectsListPage

how to write methods in ListPages? i.e ProjProjectsListPage. i am not seeing any methods in ListPages.

my requirement is that there is a grid. in that grid i have 20 records. i select any record in those 20 records . i want to know the number of which record i select. and also i want the sum of one field in that gird upto selected record -1.

eg:

Id Name cost

1 E1 20

2 E2 30

3 E3 45

4 E4 65

if i select E3. i want the sum of E1,E2 and E3

how to implement this?

List pages have interaction classes. If you look at properties of ProjProjectsListPage, you’ll see that property InteractionClass has value ProjProjectsListPageInteraction. You can write code in that class.

Thanks martin. i am new to ax 2012. can you plz give me some sample code for selected record in grid?

Example for ProjProjectsListPageInteraction class

ProjTable activeProj = this.page().activeRecord(queryDataSourceStr(ProjTable_NoFilter, ProjTable));
ProjTable selectedProj;
MultiSelectionHelper selectionHelper = MultiSelectionHelper::construct();

selectionHelper.parmDataSource(activeProj.dataSource());
selectedProj = selectionHelper.getFirst();
while (selectedProj)
{
    selectedProj = selectionHelper.getNext();
}

thanks Martin it is very useful