I am using ultragrid and found a very strange issue yestoday.
Here is my whole message that should be show in the grid:
Tuning Change for PIC390:
Gain was 0.80 / now 1.30
Reset was 0.08 / now 0.02
changed PIC380 SP to 17.5
But for some reason the grid only showing top two lines. if I copy message to clipboard from grid, it will copy the whole message. I did some testing with other messgaes but couldn't found a pattern for this issue;
Here is my code that initialized the Grid:
private
e)
{
// Set up the grid with standard colors and parameters
.ugdActivityAndAlarmLogInfo.BeginUpdate();
// FormSetup.GridSetup(ugdActivityAndAlarmLogInfo);
ugdActivityAndAlarmLogInfo.DisplayLayout.Appearance.BackColor =
.RowColor;
ugdActivityAndAlarmLogInfo.DisplayLayout.Override.SelectedRowAppearance.BackColor =
.LightGreen;
ugdActivityAndAlarmLogInfo.DisplayLayout.Override.SelectedRowAppearance.BorderColor =
.Black;
ugdActivityAndAlarmLogInfo.DisplayLayout.Override.SelectedRowAppearance.ForeColor =
.DefaultForeColor;
// Prevent the users from moving the columns in the grid
ugdActivityAndAlarmLogInfo.DisplayLayout.Override.AllowColMoving =
.NotAllowed;
e.Layout.Bands[1].Hidden =
;
// Grid setup specific to this grid
e.Layout.Bands[0].Columns[
//3
//4
//5
//6
//7
].Width = 103;
].Width = 40;
].Width = 85;
].Width = 820;
].Width = 25;
].Width = 33;
].Header.Appearance.FontData.SizeInPoints = 8;
e.Layout.Bands[0].Override.CellMultiLine = Infragistics.Win.
.True;
e.Layout.Bands[0].Override.SelectTypeRow =
.Single;
e.Layout.Bands[0].Override.RowSizing =
.Free;
//e.Layout.Bands[0].Columns["Date"].SortIndicator = SortIndicator.Ascending;
e.Layout.Bands[0].Override.CellClickAction =
.RowSelect;
.FullEditorDisplay;
e.Layout.AutoFitStyle = Infragistics.Win.UltraWinGrid.
.ExtendLastColumn;
e.Layout.RowScrollRegions[0].Scroll(
//(ScrollRowIntoView(e.Layout.Rows[e.Layout.Rows.Count - 1]);
e.Layout.RowScrollRegions[0].ScrollPosition = e.Layout.Rows[e.Layout.Rows.Count - 1].Index;
.Disabled;
].EditorComponent = ultraCheckAck;
ultraCheckAck.CheckAlign =
.TopCenter;
// e.Layout.Rows.ExpandAll(true);
//ugdActivityAndAlarmLogInfo.CreationFilter = new ModifyAALDetailEditorCreationFilter();
.ExtendedAutoDrag;
e.Layout.Bands[0].Override.BorderStyleRow =
.None;
e.Layout.Bands[0].Override.BorderStyleCell =
ugdActivityAndAlarmLogInfo.DisplayLayout.Bands[0].ColHeaderLines = 1;
.ugdActivityAndAlarmLogInfo.EndUpdate();
It's very hard to read the code you posted here, but I don't see anything here that would automatically size the height of the row to fit it's contents. You should probably be setting RowSizing to AutoFree, instead of just Free.
You may also need to handle the InitializeRow event and call PerformAutoSize on the row.
HI Mike, It's fixed as you suggested. Thanks.