Hi! My name is Mariano Abdala, and I'm having some issues trying to do something that should be simple.
In the beginning, I wanted to mark selected cells, but the active row appearance stepped over the selected cells... So I changed a couple properties (mostly the transparence of the active row) and I get some odd behavior.
This is what happens when I select multiple cells:
All the three of them are selected, but the one in the middle appearance is not the same the two on the sides. And, this is what happens if instead of selecting on the third cell I select its immediate inferior:
Can somebody please help me? I'm loosing tons of hours in this simple task...
Here are my properties on the grid:
Infragistics.Win.Appearance appearance4 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance2 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance12 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance6 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance9 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance10 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance13 = new Infragistics.Win.Appearance();
this.smartUltraGrid = new Singletree.QuickEntry.Winform.SmartDataRetrievingGrid.SmartUltraGrid(this.components);
((System.ComponentModel.ISupportInitialize)(this.smartUltraGrid)).BeginInit();
this.SuspendLayout();
//
// smartUltraGrid
appearance4.BackColor = System.Drawing.SystemColors.Window;
this.smartUltraGrid.DisplayLayout.Appearance = appearance4;
this.smartUltraGrid.DisplayLayout.CaptionVisible = Infragistics.Win.DefaultableBoolean.False;
appearance1.BackColor2 = System.Drawing.SystemColors.ControlDark;
appearance1.BorderColor = System.Drawing.SystemColors.Window;
appearance2.ForeColor = System.Drawing.SystemColors.GrayText;
this.smartUltraGrid.DisplayLayout.GroupByBox.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid;
appearance3.BackColor2 = System.Drawing.SystemColors.Control;
appearance3.ForeColor = System.Drawing.SystemColors.GrayText;
this.smartUltraGrid.DisplayLayout.LoadStyle = Infragistics.Win.UltraWinGrid.LoadStyle.LoadOnDemand;
this.smartUltraGrid.DisplayLayout.MaxRowScrollRegions = 1;
appearance12.BackColor2 = System.Drawing.SystemColors.Highlight;
appearance12.ForeColor = System.Drawing.SystemColors.HighlightText;
appearance7.BackColor = System.Drawing.SystemColors.Highlight;
appearance7.ForeColor = System.Drawing.SystemColors.ControlText;
this.smartUltraGrid.DisplayLayout.Override.AllowAddNew = Infragistics.Win.UltraWinGrid.AllowAddNew.TemplateOnBottom;
this.smartUltraGrid.DisplayLayout.Override.BorderStyleCell = Infragistics.Win.UIElementBorderStyle.Dotted;
appearance6.BackColor = System.Drawing.SystemColors.Window;
appearance5.BorderColor = System.Drawing.Color.Silver;
this.smartUltraGrid.DisplayLayout.Override.CellAppearance = appearance5;
this.smartUltraGrid.DisplayLayout.Override.CellPadding = 0;
appearance9.BackColor = System.Drawing.SystemColors.Control;
appearance9.BackGradientAlignment = Infragistics.Win.GradientAlignment.Element;
appearance9.BorderColor = System.Drawing.SystemColors.Window;
appearance11.TextHAlignAsString = "Left";
this.smartUltraGrid.DisplayLayout.Override.HeaderClickAction = Infragistics.Win.UltraWinGrid.HeaderClickAction.SortMulti;
this.smartUltraGrid.DisplayLayout.Override.MaxSelectedRows = 1;
appearance10.BorderColor = System.Drawing.Color.Silver;
this.smartUltraGrid.DisplayLayout.Override.RowSelectors = Infragistics.Win.DefaultableBoolean.False;
appearance14.BackColor2 = System.Drawing.SystemColors.Highlight;
appearance14.ForeColor = System.Drawing.SystemColors.HighlightText;
appearance13.BackColorAlpha = Infragistics.Win.Alpha.Transparent;
this.smartUltraGrid.DisplayLayout.Override.SelectedRowAppearance = appearance13;
this.smartUltraGrid.DisplayLayout.Override.SelectTypeCol = Infragistics.Win.UltraWinGrid.SelectType.None;
appearance8.BackColor = System.Drawing.SystemColors.ControlLight;
this.smartUltraGrid.DisplayLayout.ScrollBounds = Infragistics.Win.UltraWinGrid.ScrollBounds.ScrollToFill;
this.smartUltraGrid.DisplayLayout.ViewStyleBand = Infragistics.Win.UltraWinGrid.ViewStyleBand.OutlookGroupBy;
this.smartUltraGrid.DropDownService = null;
this.smartUltraGrid.GridMetaData = null;
this.smartUltraGrid.LastBandCardView = false;
this.smartUltraGrid.LockingService = null;
this.smartUltraGrid.Parent = null;
this.smartUltraGrid.ServiceProvider = null;
this.smartUltraGrid.Size = new System.Drawing.Size(569, 281);
this.smartUltraGrid.Text = "smartUltraGrid";
// smartUltraDataSource
this.smartUltraDataSource.RowsToPreview = ((uint)(100u));
// SmartGrid
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Name = "SmartGrid";
((System.ComponentModel.ISupportInitialize)(this.smartUltraGrid)).EndInit();
this.ResumeLayout(false);
Thanks!
Mariano Abdala.
Hi Mariano,
My guess is that the ActiveCellAppearance is messing you up here, because the ActiveCell does not appear selected. This KB article should help:
FAQ:How do I turn off the ActiveRowAppearance so that the active row in the grid does not appear selected.