How to use multi-line text fields in dashboards?

Hi,

Sorry for a very newbie question. I’m working on a dashbord and one of the fields needs to accommodate several lines of text directly on the grid. I need to: Be able to use line breaks, wrap text into the cell and adjust the height of the cell according to the number of lines.

Apparently, I will need code to achieve this. I haven’t used code in Epicor before but I know programming and I’m not strange to C# or VB, however, I don’t even know how to start on this. How can I access/update the properties of the grid and what properties are available?

I appreciate anyone pointing me in the right direction.

Welcome Nelson!
You need to create a customization for your dashboard. Turn on developer mode, then open your dashboard. Right click in the negative space of the form and click on Customization. In the customization, you want to select the grid that needs to be multi-line. Then, look in your properties for the grid. Find Multiline and set it to True. This will set all the columns in your grid to allow multiline.

To adjust the grid spacing, you may need some actual code.
Here is a bit of code I use to adjust the grid properties. I am executing this code as part of an epiviewnotification event. But you can link to any event you want. Use the Form Event Wizard, and find EpiViewNotifiation. Add the event for the grid you are interested in, then in your custom code section, find the event code that was added. Modify the code to include something like this:

	private void edvV_Your_grid_view_name_1View_EpiViewNotification(EpiDataView view, EpiNotifyArgs args)
	{
String myRef ="724d4f74-671e-4121-a733-bc073bdb144d";
EpiUltraGrid mesGrid;		
mesGrid = (EpiUltraGrid)csm.GetNativeControlReference(myRef);
mesGrid.DisplayLayout.Override.AllowRowFiltering = DefaultableBoolean.False;
mesGrid.DisplayLayout.Appearance.FontData.SizeInPoints = 10;
mesGrid.Parent.Width = 625;
mesGrid.Width = 625;		
mesGrid.DisplayLayout.AutoFitStyle = AutoFitStyle.ResizeAllColumns;	
mesGrid.DisplayLayout.PerformAutoResizeColumns(false, PerformAutoSizeType.AllRowsInBand, true);
}

Make sure you save the customization! By default the menu will not open the dashboard with your customization. You will have to find your dashboard menu option in Menu Maintenance, and set the customization for your dashboard there. You will have to close and restart Epicor after you edit the menu.
Good luck and post back with any questions!
Nate

1 Like

Hi NateS, that’s exactly what I was looking for and it worked wonderfully Thanks a lot!.

Cheers,
Nelson

Hi Nate!

Sorry for poking you about this, but is there any “using” or anything else that we need to add for using that code, because I’m getting that compiling error:

Thanks in advance :slight_smile:

I am not sure if one of these is the right one, but here is the list I use on that form:

using System;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Windows.Forms;
using Ice.BO;
using Ice.UI;
using Ice.Lib;
using Ice.Adapters;
using Ice.Lib.Customization;
using Ice.Lib.ExtendedProps;
using Ice.Lib.Framework;
using Ice.Lib.Searches;
using Ice.UI.FormFunctions;
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
using System.Diagnostics;
using System.Reflection;
1 Like

Found it!

I had to use those:

using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;

Thanks for your quick reply sir! :slight_smile: