Skip to main content
Solved

How to get the count of visible rows in grid?


I want to get count of all visible records on grid. If I will filter it for ex. by Vendor record count will change and I want that count not from BQL select;

Best answer by Naveen Boga

Hi @NikaKakhetelidze   Here is the article was written by Sergey along with an example to display the Row Count along with the pages.

Hope this helps.

https://asiablog.acumatica.com/2018/07/page-number-on-acumatica-grid.html

View original
Did this topic help you find an answer to your question?

8 replies

Forum|alt.badge.img+5
  • Captain II
  • 505 replies
  • June 16, 2022

Just to be clear what you’re asking for: You want to know how many records that your grid can display on one screen or you want to know how many records that the grid’s underlying view is ‘holding’ due to filtering conditions.


I want to know how many records that the grid’s underlying view is ‘holding’ due to filtering conditions


Vinay Koppula
Semi-Pro II
Forum|alt.badge.img+1

@NikaKakhetelidze 

Trick is here it add the PagerSettings tag highlighted in the red in the aspx page. 

<px:PXGrid ID="grid" runat="server" DataSourceID="ds" ... >

<Levels>

<px:PXGridLevel DataMember="...">

<Columns>

</Columns>

</px:PXGridLevel>

</Levels>

<ActionBar PagerVisible="Bottom">

<PagerSettings Mode="NumericCompact" />

</ActionBar>

</px:PXGrid>

Refer the below link for more info. 

Page Number on Acumatica Grid - Acumatica Developers Blog

 


Vinay Koppula wrote:

@NikaKakhetelidze

Trick is here it add the PagerSettings tag highlighted in the red in the aspx page. 

<px:PXGrid ID="grid" runat="server" DataSourceID="ds" ... >

<Levels>

<px:PXGridLevel DataMember="...">

<Columns>

</Columns>

</px:PXGridLevel>

</Levels>

<ActionBar PagerVisible="Bottom">

<PagerSettings Mode="NumericCompact" />

</ActionBar>

</px:PXGrid>

Refer the below link for more info. 

Page Number on Acumatica Grid - Acumatica Developers Blog

 

 

@Vinay Koppula Thank you for Reply

Yeah I know that, but I want to do this at acumatica pages and not custom. so I cannot just edit aspx and <PagerSettings Mode="NumericCompact" /> this part is not available for customization.

So what I am trying here is to add int Field at Filter and put amount there

 


Only this option is available PageVisible Property and that’s it. I cannot Find <PagerSettings Mode="NumericCompact" />


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3381 replies
  • Answer
  • June 16, 2022

Hi @NikaKakhetelidze   Here is the article was written by Sergey along with an example to display the Row Count along with the pages.

Hope this helps.

https://asiablog.acumatica.com/2018/07/page-number-on-acumatica-grid.html


Hi @NikaKakhetelidze. You can also try this solution. I my case you can this with customization package as well, without changing site’s files. I tried to implement this on MRP Exceptions (AM403000). First of all we need to add new field to the Grid table. In my case I added unbound field to the AMRPExceptions.

DAC extension

Then we need to override a graph to fill this new field with count row data.

Graph Extension

 

After all of this we need to change a bit page by customization editor. For the grid object we need to setup a StatusField 

As a result, we will have 

Also, when we will filtered our data by using column filter it will be recalculated 


vlavrynovych96 wrote:

Hi @NikaKakhetelidze. You can also try this solution. I my case you can this with customization package as well, without changing site’s files. I tried to implement this on MRP Exceptions (AM403000). First of all we need to add new field to the Grid table. In my case I added unbound field to the AMRPExceptions.

DAC extension

Then we need to override a graph to fill this new field with count row data.

Graph Extension

 

After all of this we need to change a bit page by customization editor. For the grid object we need to setup a StatusField 

As a result, we will have 

Also, when we will filtered our data by using column filter it will be recalculated 

I found some issue with few pages in the grid. To solve we need to change a bit select delegate.

 

protected virtual IEnumerable exceptRecs()        

{            

var selectLines = new PXSelect<AMRPExceptions>(Base);            

int startRow = PXView.StartRow;            

int totalRows = 0;            

var result = selectLines.View.Select(PXView.Currents, PXView.Parameters, PXView.Searches,                 PXView.SortColumns, PXView.Descendings, PXView.Filters, ref startRow, PXView.MaximumRows, ref totalRows);            

PXView.StartRow = 0;            

 

//select for total rows            

int startAllRow = 0;            

int totalAllRows = 0;            

var resultAllRows = selectLines.View.Select(PXView.Currents, PXView.Parameters, PXView.Searches,                 PXView.SortColumns, PXView.Descendings, PXView.Filters, ref startAllRow, int.MaxValue, ref totalAllRows);            

rowCount = totalAllRows;            

 

return result;        

}


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings