Dashboard Text wrapping / Row Height

How can I make the rows in a dashboard tall enough to fit all the text in a field (part description)?

So I would guess that the table on a dashboard is an EpiUltraGrid, based off a Infragistics UltraGrid if I understand correctly… So if I could set DisplayLayout.Override.CellMultiLine = DefaultableBoolean.True and DisplayLayout.Bands(0).Override.RowSizing = RowSizing.AutoFree then I would probably get the result I want.

Is there any way to customize a dashboard?

Sure, compile it to an assembly (SmartClient), add a menu item for it, create a customization for it.

How though? When I click any other menu item, such as quote entry the customization window appears but when I click dashboard menu items it does not show that window.

I’m confused as to what you just said. Is it that you not know how to compile to an assembly? Or how to add it to the menu? Or add a customization?

I have a dashboard. I have deployed it with the “Deploy Smart Client Application” Checked
I have a menu item for this dashboard.
With developer mode turned on, clicking on the menu item does not present any of the customization options I would expect to see. If I customize the quote entry form or other menu items I can add controls, code etc. I can only change which fields show and what grouping is used for the Dashboard, not add controls such as buttons etc.

Did you create the menu item or was it autocreated? If so - did you select Dashboard Assembly (not runtime)

I don’t have menu security access - got my boss to change it and now it works. (After restarting Epicor) Thanks.

Now I just need to get the text to wrap.

1 Like

The text wraps fine but the rows are not getting taller to fit the text. This is what I have:

Ice.Lib.Customization.PersonalizeCustomizeManager personalizeCustomizeManager = this.csm.PersonalizeCustomizeManager;

		// myGrid
		Ice.Lib.Framework.EpiUltraGrid local5 = ((Ice.Lib.Framework.EpiUltraGrid)(personalizeCustomizeManager.ControlsHT["a054b6e7-16d8-4237-9e56-89afe9b20333"]));
		local5.DisplayLayout.Override.RowSizing = Infragistics.Win.UltraWinGrid.RowSizing.AutoFree;
		local5.DisplayLayout.Override.CellMultiLine = Infragistics.Win.DefaultableBoolean.True;
		// myGrid
		Ice.Lib.Framework.EpiUltraGrid local6 = ((Ice.Lib.Framework.EpiUltraGrid)(personalizeCustomizeManager.ControlsHT["6c520fd9-6bb7-4ecb-a97c-63503cc23b58"]));
		local6.DisplayLayout.Override.RowSizing = Infragistics.Win.UltraWinGrid.RowSizing.AutoFree;
		local6.DisplayLayout.Override.CellMultiLine = Infragistics.Win.DefaultableBoolean.True;

			foreach ( Infragistics.Win.UltraWinGrid.UltraGridRow row in local6.Rows.All)
            {
                row.PerformAutoSize();
            }
			foreach ( Infragistics.Win.UltraWinGrid.UltraGridRow row in local5.Rows.All)
            {
                row.PerformAutoSize();
            }
		MessageBox.Show("Ran");

How do I get the rows to auto-size to be tall enough for the text to fit?

Maybe try

UltraGrid.DisplayLayout.Override.RowSizing = Infragistics.Win.UltraWinGrid.RowSizing.AutoFree;

Hmm, maybe I am confused but isn’t that in the code I posted :thinking:

(Edited out the "not working comments as I don’t actually know what part isn’t working in the code)

Lol - I only read 30% of any given posts in no particular order apparently :stuck_out_tongue:

So what function/event is triggering your code?

I have it in InitializeCustomCode()

Perhaps you could add an event to the grid for InitializeLayout. Not sure, I’d have to play with it.

A possibility is that some underlying code it setting the formatting of that grid.You could easily test that theory by adding a grid as a custom control and seeing if it behaves any differently.

I think something related to grouping might be screwing it up? I notice that when things are un-grouped I can resize each row individually but when things are grouped resizing one row resizes them all…

Yeah, I added a button and put the code in the click event. It does what I want.

How would I go about making it so that my code runs after the data loads? I tried Form load and InitializeLayout for the grid but neither had the desired result.

Perhaps try an InitializeLayout event. Put this in your Initialize code (change the ref as needed)

yourGridRef.InitializeLayout += (o,e) =>
{
  var sender = (EpiUltraGrid)o;
  sender.DisplayLayout.Override.RowSizing = Infragistics.Win.UltraWinGrid.RowSizing.AutoFree;
  //etc, rest of code here
};
2 Likes

That worked! - must be I set up the InitializeLayout event wrong the first time or didn’t reload the customization correctly. (Unless using an inline function makes a difference…?)

Big thanks :slight_smile:

The inline wouldnt matter so much as having to explicitly create the event since you cant use the wizard on a native control. Glad it worked!

1 Like

Hi all,

I have followed all the steps described, but the event for initializeLayout just won’t trigger. I tried both inline function and separate function.

I think this person in this post also had the same problem.

Here is my code, the MessageBox for Event Triggered just won’t fire. Any ideas?

public void InitializeCustomCode()
{
	// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Initialization' lines **
	// Begin Wizard Added Variable Initialization

	dayLoadGrid = (EpiUltraGrid) csm.GetNativeControlReference("236c8dfb-5f01-4403-b73e-d104d2eb92c9");
	dayLoadGrid.DisplayLayout.Override.RowSizing = Infragistics.Win.UltraWinGrid.RowSizing.AutoFree;
	dayLoadGrid.DisplayLayout.Override.CellMultiLine = Infragistics.Win.DefaultableBoolean.True;

	foreach ( Infragistics.Win.UltraWinGrid.UltraGridRow row in dayLoadGrid.Rows.All)
    {
    	row.PerformAutoSize();
    }

	dayLoadGrid.InitializeLayout += (o,e) =>
	{
		MessageBox.Show("Event triggered");
	    var sender = (EpiUltraGrid)o;
	    sender.DisplayLayout.Override.RowSizing = Infragistics.Win.UltraWinGrid.RowSizing.AutoFree;
	    //etc, rest of code here
	};
	// dayLoadGrid.InitializeLayout += new Infragistics.Win.UltraWinGrid.InitializeLayoutEventHandler(this.dayLoadGrid_InitializeLayout);
	// End Wizard Added Variable Initialization

	// Begin Wizard Added Custom Method Calls

	// End Wizard Added Custom Method Calls

	MessageBox.Show("InitializeCustomCode");
}