Hello Everyone,
We have a requirement to show the count of selected records on the processing screen grid footer.
We have used Statusfield of the grid control and added my custom field fieldselecting event to show the selected record count in the code.
The issue is, The total value in the footer in not updating when we select the checkbox in the processing screen result grid. The count value in the footer is updating when we do grid refresh manually on the screen. I have added “commitchanges = true” to the checkbox and other refresh paramaters in the aspx page but stll it is not working.
Below is the code sample.
namespace PX.Objects.AR
{
public class ARDocumentRelease_Extension : PXGraphExtension<ARDocumentRelease>
{
public virtual void BalancedARDocument_Availability_FieldSelecting(PXCache sender, PXFieldSelectingEventArgs e)
{
// Set text that appear in footer
string text;
int selectcount = 0;
foreach (BalancedARDocument resultdata in Base.ARDocumentList.Select())
{
if (resultdata.Selected == true)
{
selectcount++;
}
}
text = "Selected Count: " + selectcount ;
e.ReturnValue = text;
}
public partial class BalancedARDocument_ext1 : PXCacheExtension<BalancedARDocument>
{
#region Availability
public abstract class availability : BqlString.Field<availability> { }
PXString(4000, IsUnicode = true)]
PXUIField(DisplayName = "Availability")]
public virtual string Availability
{
get;
set;
}
#endregion
}
}
}
<px:PXGridColumn DataField="Selected" TextAlign="Center" Type="CheckBox" AllowCheckAll="True" AllowSort="False" CommitChanges="true" AllowMove="False" />
What else we need to provide to the selected checkbox or grid to update the count automatically?
Thanks