[EDIT]
By changing the Column.CellDisplayStyle = UltraGrid.CellDisplayStyle.PlainText, the newlines are respected.
I'm using Infragistics2.Win.UltraWinGrid.v9.2 in a .Net 4.0 project. This has to be very simple.
Assuming I'm populating the grid with a List, how do I simply display MyData.States as a newline delimited sting. The grid is read-only.
public class MyData
{
public int ID{get;set;}
public List States{get;set;}
}
What I've done is to set the bound States column to hidden, added an unbound column and am manually doing the following in the InitializeRow method
...
var planStatesCell = e.Row.Cells[KEY_STATES];
if (planStatesCell != null) planStatesCell.Value = string.Join("\n", language.PlanStates);
Oddly I get a column wraps based on the width of the column and not the newline character... as if the newline character is stripped.
What am I overlooking?
Kevin
Hi Kevin,
Use Environment.NewLine instead of "\n"
Thanks for the feedback Mike.
...and woudn't you know it that after getting what I wanted, I realized I stlll wasn't happy with the results, so I've reverted to allowing the grid to wrap a space delimited list of states
But to my original question, is there a way i could have the grid format a property of type List<string> or even List<MyCustomObject> automagically... using DataBinder.Eval()?
Thank you I made it work!