Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
155
Grid only showing top two line of the total messages in cell
posted

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

 

 

void InitializeAALGrid(Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs

e)

{

 

 

// Set up the grid with standard colors and parameters

 

 

this

.ugdActivityAndAlarmLogInfo.BeginUpdate();

 

 

// FormSetup.GridSetup(ugdActivityAndAlarmLogInfo);

ugdActivityAndAlarmLogInfo.DisplayLayout.Appearance.BackColor =

 

SystemParameters

.RowColor;

ugdActivityAndAlarmLogInfo.DisplayLayout.Override.SelectedRowAppearance.BackColor =

 

Color

.LightGreen;

ugdActivityAndAlarmLogInfo.DisplayLayout.Override.SelectedRowAppearance.BorderColor =

 

Color

.Black;

ugdActivityAndAlarmLogInfo.DisplayLayout.Override.SelectedRowAppearance.ForeColor =

 

Control

.DefaultForeColor;

 

 

// Prevent the users from moving the columns in the grid

ugdActivityAndAlarmLogInfo.DisplayLayout.Override.AllowColMoving =

 

AllowColMoving

.NotAllowed;

e.Layout.Bands[1].Hidden =

 

true

;

 

 

// Grid setup specific to this grid

e.Layout.Bands[0].Columns[

 

"AlarmDetails"].Header.Caption = LocalLanguage.GetString("MaintainActivityAndAlarmLogView_3");

//3

e.Layout.Bands[0].Columns[

 

"ReceivedDate"].Header.Caption = LocalLanguage.GetString("MaintainActivityAndAlarmLogView_4");

//4

e.Layout.Bands[0].Columns[

 

"AckByInitials"].Header.Caption = LocalLanguage.GetString("MaintainActivityAndAlarmLogView_5");

//5

e.Layout.Bands[0].Columns[

 

"AckTimeStamp"].Header.Caption = LocalLanguage.GetString("MaintainActivityAndAlarmLogView_6");

//6

e.Layout.Bands[0].Columns[

 

"CallerID"].Header.Caption = LocalLanguage.GetString("MaintainActivityAndAlarmLogView_7");

//7

e.Layout.Bands[0].Columns[

 

"Attachments"].Header.Caption = ""

;

e.Layout.Bands[0].Columns[

 

"AlarmAlarmDetailExp"].Header.Caption = ""

;

e.Layout.Bands[0].Columns[

 

"AckTimeStamp"

].Width = 103;

e.Layout.Bands[0].Columns[

 

"ReceivedDate"

].Width = 103;

e.Layout.Bands[0].Columns[

 

"AckByInitials"

].Width = 40;

e.Layout.Bands[0].Columns[

 

"CallerID"

].Width = 85;

e.Layout.Bands[0].Columns[

 

"AlarmDetails"

].Width = 820;

e.Layout.Bands[0].Columns[

 

"Attachments"

].Width = 25;

e.Layout.Bands[0].Columns[

 

"AlarmAlarmDetailExp"

].Width = 25;

e.Layout.Bands[0].Columns[

 

"Ack"

].Width = 33;

e.Layout.Bands[0].Columns[

 

"Ack"

].Header.Appearance.FontData.SizeInPoints = 8;

e.Layout.Bands[0].Columns[

 

"AlarmDetails"

].Header.Appearance.FontData.SizeInPoints = 8;

e.Layout.Bands[0].Columns[

 

"ReceivedDate"

].Header.Appearance.FontData.SizeInPoints = 8;

e.Layout.Bands[0].Columns[

 

"AckByInitials"

].Header.Appearance.FontData.SizeInPoints = 8;

e.Layout.Bands[0].Columns[

 

"AckTimeStamp"

].Header.Appearance.FontData.SizeInPoints = 8;

e.Layout.Bands[0].Columns[

 

"CallerID"

].Header.Appearance.FontData.SizeInPoints = 8;

e.Layout.Bands[0].Columns[

 

"AlarmDetails"].CellAppearance.FontData.Name = "Lucida Sans Typewriter"

;

e.Layout.Bands[0].Override.CellMultiLine = Infragistics.Win.

 

DefaultableBoolean

.True;

e.Layout.Bands[0].Override.SelectTypeRow =

 

SelectType

.Single;

e.Layout.Bands[0].Override.RowSizing =

 

RowSizing

.Free;

e.Layout.Bands[0].Columns[

 

"ActivityCode"].Hidden = true

;

e.Layout.Bands[0].Columns[

 

"ActivityStamp"].Hidden = true

;

e.Layout.Bands[0].Columns[

 

"AlarmDetailLines"].Hidden = true

;

e.Layout.Bands[0].Columns[

 

"IsAlarmDetail"].Hidden = true

;

e.Layout.Bands[0].Columns[

 

"HasAttachments"].Hidden = true

;

e.Layout.Bands[0].Columns[

 

"Comments"].Hidden = true

;

 

 

//e.Layout.Bands[0].Columns["Date"].SortIndicator = SortIndicator.Ascending;

e.Layout.Bands[0].Columns[

 

"Date"].Hidden = true

;

e.Layout.Bands[0].Columns[

 

"ActivityAndAlarmLogId"].Hidden = true

;

e.Layout.Bands[0].Columns[

 

"AlarmId"].Hidden = true

;

e.Layout.Bands[0].Columns[

 

"AckBy"].Hidden = true

;

e.Layout.Bands[0].Columns[

 

"AckDateTime"].Hidden = true

;

e.Layout.Bands[0].Columns[

 

"DeviceCode"].Hidden = true

;

e.Layout.Bands[0].Columns[

 

"ActivityId"].Hidden = true

;

e.Layout.Bands[0].Columns[

 

"ActivityPersonId"].Hidden = true

;

e.Layout.Bands[0].Columns[

 

"AlarmDetailKeyCode"].Hidden = true

;

e.Layout.Bands[0].Columns[

 

"AlarmDetailId"].Hidden = true

;

e.Layout.Bands[0].Override.CellClickAction =

 

CellClickAction

.RowSelect;

e.Layout.Bands[0].Columns[

 

"AlarmDetails"].CellDisplayStyle = CellDisplayStyle

.FullEditorDisplay;

e.Layout.AutoFitStyle = Infragistics.Win.UltraWinGrid.

 

AutoFitStyle

.ExtendLastColumn;

e.Layout.RowScrollRegions[0].Scroll(

 

RowScrollAction.Bottom);

//(ScrollRowIntoView(e.Layout.Rows[e.Layout.Rows.Count - 1]);

e.Layout.RowScrollRegions[0].ScrollPosition = e.Layout.Rows[e.Layout.Rows.Count - 1].Index;

e.Layout.Bands[0].Columns[

 

"ReceivedDate"].Format = "MM/dd hh:mm tt"

;

e.Layout.Bands[0].Columns[

 

"Ack"].SortIndicator = SortIndicator

.Disabled;

e.Layout.Bands[0].Columns[

 

"ReceivedDate"].SortIndicator = SortIndicator

.Disabled;

e.Layout.Bands[0].Columns[

 

"AlarmDetails"].SortIndicator = SortIndicator

.Disabled;

e.Layout.Bands[0].Columns[

 

"AckTimeStamp"].SortIndicator = SortIndicator

.Disabled;

e.Layout.Bands[0].Columns[

 

"AckByInitials"].SortIndicator = SortIndicator

.Disabled;

e.Layout.Bands[0].Columns[

 

"CallerID"].SortIndicator = SortIndicator

.Disabled;

e.Layout.Bands[0].Columns[

 

"Attachments"].SortIndicator = SortIndicator

.Disabled;

e.Layout.Bands[0].Columns[

 

"AlarmAlarmDetailExp"].SortIndicator = SortIndicator

.Disabled;

e.Layout.Bands[0].Columns[

 

"Ack"

].EditorComponent = ultraCheckAck;

ultraCheckAck.CheckAlign =

 

ContentAlignment

.TopCenter;

 

 

// e.Layout.Rows.ExpandAll(true);

 

 

//ugdActivityAndAlarmLogInfo.CreationFilter = new ModifyAALDetailEditorCreationFilter();

e.Layout.Bands[0].Override.SelectTypeRow =

 

SelectType

.ExtendedAutoDrag;

e.Layout.Bands[0].Override.BorderStyleRow =

 

UIElementBorderStyle

.None;

e.Layout.Bands[0].Override.BorderStyleCell =

 

UIElementBorderStyle

.None;

ugdActivityAndAlarmLogInfo.DisplayLayout.Bands[0].ColHeaderLines = 1;

 

 

this

.ugdActivityAndAlarmLogInfo.EndUpdate();

Parents
No Data
Reply
  • 469350
    Offline posted

    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.

Children