Dashboard Text wrapping / Row Height

Yeah, that didn’t work reliably for me either. I ended up just using the load event instead, works fine for my purposes.

	private void MainController_Load(object sender, EventArgs args)
	{
		Ice.Lib.Customization.PersonalizeCustomizeManager personalizeCustomizeManager = this.csm.PersonalizeCustomizeManager;
		// myGrid
		Ice.Lib.Framework.EpiUltraGrid local2 = ((Ice.Lib.Framework.EpiUltraGrid)(personalizeCustomizeManager.ControlsHT["a982c660-8da7-4c1a-a775-624d31758cb5"]));
		local2.DisplayLayout.Override.RowSizing = Infragistics.Win.UltraWinGrid.RowSizing.AutoFree;
		local2.DisplayLayout.Override.CellMultiLine = Infragistics.Win.DefaultableBoolean.True;
	}
2 Likes

Would you mind posting a screen shot of the final results? I would like to see what the grid ends up looking like.

1 Like

Hello Evan,

Have you tried this for the columns headers as well? Having the ability to have 2 lines per column would help reduce the width, and still having meaningfull column headers, instead of truncated ones…:wink:

Pierre

1 Like

Shhh, don’t give them ideas. Besides I haven’t figured out how to get the “page setup” menu item to come back with this customization present.

1 Like

That’s nice solution. I want to understand a little better before I try it. Basically you are setting the width via some method (properties, or code, or personalization or whatever) and the AutoFree command then sets the row height based on the text in the cell right?

@Evan_Purdy @Chris_Conn?

Actually I just had the width set by dragging the columns in developer mode and saving it. Only the row height is being set from code. I bet you can set the column widths from code as well, but I didn’t have any need for them to dynamically change, paper stays the same size…

Otherwise yes, this is a very simple customization.

1 Like
  1. Are LF’s, CR’s, or other line breaks in the text supported?
  2. Any way to set a max row height? So an auto-height row can’t get too big.
  1. Yes, seems like it might be picky about the characters though. I would use Environment.NewLine to be sure.
  2. I think DisplayLayout.Override.RowSizingAutoMaxLines can be used to set the max number of lines for the rows. Remember these are all just Infragistics controls in the background, so looking at the documentation for the infragistics UltraGrid can be helpful.
1 Like

I’m too new to coding.
Error occurs, what do I miss?

var yourGridRef = (EpiUltraGrid)csm.GetNativeControlReference(“your guid here a9a…”);
yourGridRef.InitializeLayout += (o,e) =>

1 Like

Thanks!

DisplayLayout.Override.WrapHeaderText = Infragistics.Win.DefaultableBoolean.True;

This works to me.

This worked but is there a way to set it so that the minimum row is 1 instead of the default two line height? It seems like all rows are defaulting to two rows regardless of wrapping or not. Or if this can be applied to only one column and not all column wrapping.

Hmm not sure but I’d give the DisplayLayout.Override.DefaultRowHeight property a try