Solved

Customize File Dialog Box and Add column to the grid

  • 19 September 2022
  • 2 replies
  • 241 views

Userlevel 2
Badge

Hi team,

 

Is it possible to customize file dialog to add new column.

 

 

Thanks,

Arun.

icon

Best answer by Nayan Mansinha 19 September 2022, 21:01

View original

2 replies

Userlevel 4
Badge +2

I asked a similar question to Developer support in the past and was told it was either not possible or not practical. I forget which.

Short answer is - not possible.  

This dialog is not available for customization, except that one can only add some custom buttons to it.  e.g. below:

     public class FilesDialogExtender : IFilesDialogExtender

{
public void AddAction(PXGraph graph, string view)
{
if ((graph is PXGenericInqGrph) ||
(String.IsNullOrEmpty(graph.PrimaryView)) ||
(graph.PrimaryItemType == null))
{ return; }

if (!graph.Actions.Contains("MyButton"))
{
PXButtonDelegate uploadFromDemo1 = delegate (PXAdapter adapter)
{
var g = adapter.View.Graph;
g.Views[g.PrimaryView].Ask("MyButton", MessageButtons.OK);
return adapter.Get();
};
PXButtonAttribute buttonAttribute = null;
{
buttonAttribute = PXEventSubscriberAttribute.CreateInstance<PXButtonAttribute>();
buttonAttribute.VisibleOnDataSource = false;
buttonAttribute.PopupVisible = false;
}

PXUIFieldAttribute uiFieldAttribute = null;
{
uiFieldAttribute = PXEventSubscriberAttribute.CreateInstance<PXUIFieldAttribute>();
uiFieldAttribute.DisplayName = "My Button";
uiFieldAttribute.Visible = true;
uiFieldAttribute.MapEnableRights = PXCacheRights.Select;
uiFieldAttribute.MapViewRights = PXCacheRights.Select;
}
List<PXEventSubscriberAttribute> attribs = new List<PXEventSubscriberAttribute>();
attribs.Add(buttonAttribute);
attribs.Add(uiFieldAttribute);
PXNamedAction.AddAction(graph, graph.PrimaryItemType, "MyButton", "My Button", uploadFromDemo1, attribs.ToArray());
}
}

public IEnumerable<ToolbarButtonDescriptor> GetToolbarButtons(PXGraph graph, string view)
{
Type graphType = graph?.GetType();
if ((graphType != typeof(PXGenericInqGrph)))
{
var btn = new ToolbarButtonDescriptor(null, "MyButton", "MyButton");
btn.CommandArgument = view;

return new ToolbarButtonDescriptor[] { btn };
}
return null;
}
}

 

Badge +11

I asked a similar question to Developer support in the past and was told it was either not possible or not practical. I forget which.

If it is possible, I would like to customize the column sizes.

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