Solved

How Can I add multi-line tooltip (Hint) to DATA ENTRY grid headings?


Userlevel 7
Badge +9

Hello Gang;

Is there a way to add multi line Tooltip to Acumatica Grid Headings. I know I can go to Grid > Header > Tooltip and add a hint but it displays in one line. How Can I break the hint into multiple lines? I have a grid with too many columns which most of them are calculated and have some complex formulas. I want  to show the user how each formulated column is calculated. When everything is in one line it is hard to read and underestand. Any help is appreciated either through grid property settings or C# code that I can incorporate to my code and pass it to the grid header.

icon

Best answer by aaghaei 9 June 2022, 09:01

View original

2 replies

Userlevel 7
Badge +9

UPDATE

I couldn’t make it work through the grid properties from the interface but here is what I did through code and works fine for me. I’m sharing this in case someone comes across the same need.

public override void Initialize()
{
Page page = HttpContext.Current?.Handler as PXPage;
if (page != null)
{
page.Load += Page_Load;
}
}

private void Page_Load(object sender, EventArgs e)
{
Page page = (Page)sender;

PX.Web.UI.PXGrid approvalGridWithStyle = (PX.Web.UI.PXGrid)ControlHelper.FindControl("grid", page);
if (approvalGridWithStyle != null)
{
approvalGridWithStyle.RowDataBound += (object grdsender, PXGridRowEventArgs erdb) =>
{
PMCostProjectionLine data = erdb.Row.DataItem as PMCostProjectionLine;

if (data != null)
{
// Columns Tooltip
var newLine = Environment.NewLine;
erdb.Row.Cells["UsrCFBudgetRevised"].Column.Header.ToolTip = "+ Original Budget" + newLine + "+ Budget Modification and Reclassification" + newLine + "+ Budget Approved Change Orders";
erdb.Row.Cells["UsrCFBudgetProjected"].Column.Header.ToolTip = "+ Revised Budget" + newLine + "+ Budget Pending Change Orders";
}
else
{
return;
}
};
}
}

 

Userlevel 7
Badge +9

@ShahidaValiSyed04 FYI in case you need this

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved