Hi Kartik, thank you for getting back to me.
Here is the code that setups up the grid:
fgdNav.Clear();
fgdNav.Font = new Font("Segoe UI", 9);
CellStyle cs = fgdNav.Styles.Add("selected");
cs.Font = new Font("Arial", 8, FontStyle.Bold);
cs.BackgroundImage = Properties.Resources.selected_background;
cs.BackgroundImageLayout = ImageAlignEnum.TileStretch;
cs.ForeColor = Color.White;
cs = fgdNav.Styles.Add("wantListLowPriority");
cs.ForeColor = Color.LightBlue;
cs.TextAlign = TextAlignEnum.LeftCenter;
cs = fgdNav.Styles.Add("wantListNormalPriority");
cs.ForeColor = Color.LightGreen;
cs.TextAlign = TextAlignEnum.LeftCenter;
cs = fgdNav.Styles.Add("wantListMediumPriority");
cs.ForeColor = Color.Violet;
cs.TextAlign = TextAlignEnum.LeftCenter;
cs = fgdNav.Styles.Add("wantListHighPriority");
cs.ForeColor = Color.Orange;
cs.TextAlign = TextAlignEnum.LeftCenter;
cs = fgdNav.Styles.Add("wantListUrgentPriority");
cs.ForeColor = Color.Red;
cs.TextAlign = TextAlignEnum.LeftCenter;
cs = fgdNav.Styles.Add("wantListOtherDenomination");
cs.BackColor = Color.LightGray;
cs = fgdNav.Styles.Add("unselected");
cs.BackColor = Color.White;
cs.Font = new Font("Arial", 8, FontStyle.Regular);
cs = fgdNav.Styles.Add("denomination");
cs.BackgroundImage = Properties.Resources.denomination_background;
cs.BackgroundImageLayout = ImageAlignEnum.LeftCenter;
cs.Font = new Font("Arial", 10, FontStyle.Bold);
cs.ForeColor = Color.White;
cs = fgdNav.Styles.Add("gainpercent");
cs.ForeColor = Color.Blue;
cs.Font = new Font("Arial", 8, FontStyle.Bold);
cs = fgdNav.Styles.Add("losepercent");
cs.ForeColor = Color.Red;
cs.Font = new Font("Arial", 8, FontStyle.Regular);
cs = fgdNav.Styles.Add("percent");
cs.ForeColor = Color.Black;
cs.Font = new Font("Arial", 8, FontStyle.Regular);
cs = fgdNav.Styles.Add("centered");
cs.TextAlign = TextAlignEnum.CenterCenter;
cs = fgdNav.Styles.Add("serialnumber");
cs.TextAlign = TextAlignEnum.LeftCenter;
fgdNav.AllowAddNew = false;
fgdNav.AllowDelete = false;
fgdNav.AllowDragging = AllowDraggingEnum.None;
fgdNav.AllowEditing = false;
fgdNav.AllowFreezing = AllowFreezingEnum.None;
fgdNav.AllowMerging = AllowMergingEnum.Free;
fgdNav.AllowResizing = AllowResizingEnum.None;
fgdNav.AllowSorting = AllowSortingEnum.None;
fgdNav.BorderStyle = C1.Win.FlexGrid.Util.BaseControls.BorderStyleEnum.None;
fgdNav.ExtendLastCol = true;
fgdNav.FocusRect = FocusRectEnum.None;
fgdNav.SelectionMode = SelectionModeEnum.Row;
fgdNav.Styles["Normal"].Border.Style = BorderStyleEnum.None;
fgdNav.Styles["EmptyArea"].Border.Style = BorderStyleEnum.None;
fgdNav.HighLight = HighLightEnum.Never;
fgdNav.DrawMode = DrawModeEnum.OwnerDraw;
fgdNav.Cols.Count = 10;
fgdNav.Cols.Fixed = 0;
fgdNav.Rows.Count = 1;
fgdNav.Rows.Fixed = 1;
fgdNav.Cols[0].Width = 50;
fgdNav.Cols[1].Width = 50;
fgdNav.Cols[2].Width = 50;
fgdNav.Cols[3].Width = 50;
fgdNav.Cols[4].Width = 60;
fgdNav.Cols[5].Width = 50;
fgdNav.Cols[6].Width = 100;
fgdNav.Cols[7].Width = 60;
fgdNav.Cols[8].Width = 400;
fgdNav.SetData(0, 1, "Own");
fgdNav.SetData(0, 2, "Want");
fgdNav.SetData(0, 3, "Need");
fgdNav.SetData(0, 4, "Upgrade");
fgdNav.SetData(0, 5, "Key");
fgdNav.SetData(0, 6, "Year");
fgdNav.SetData(0, 7, "MM");
fgdNav.SetData(0, 8, "Variety/Description");
fgdNav.SetData(0, 9, "Denomination");
fgdNav.ResumeLayout();
fgdNav.BringToFront();
Next is the code to populate the list items into the grid:
fgdNav.SuspendLayout();
foreach (CoinCatalogGridModel coin in coins.ToList())
{
string strPotentialDenomination = "";
if (currentView == eView.Catalog_Coin || currentView == eView.Collection_Coin)
{
strPotentialDenomination = coin.Denomination;
}
else if (currentView == eView.Catalog_CollectorCoin)
{
strPotentialDenomination = coin.NumismaticSeriesName;
}
if (strPotentialDenomination == "")
strPotentialDenomination = "No Series";
// Add denomination row if required
//if (currentDenomination != strPotentialDenomination)
//{
// currentDenomination = strPotentialDenomination;
// fgdNav.Rows.Count++;
// intCurrentRow = fgdNav.Rows.Count - 1;
// fgdNav.Rows[intCurrentRow].Height = 20;
// CellRange cel = new CellRange
// {
// r1 = intCurrentRow,
// r2 = intCurrentRow,
// c1 = 0,
// c2 = fgdNav.Cols.Count - 1
// };
// fgdNav.SetData(cel, currentDenomination);
// fgdNav.Cols[0].AllowMerging = fgdNav.Cols[fgdNav.Cols.Count - 1].AllowMerging = true;
// fgdNav.Rows[intCurrentRow].AllowMerging = true;
// fgdNav.SetCellImage(intCurrentRow, 0, iml.Images["Denomination"]);
// fgdNav.Cols[0].ImageAlign = ImageAlignEnum.LeftCenter;
// fgdNav.Rows[intCurrentRow].UserData = "Denomination|" + currentDenomination;
// fgdNav.SetUserData(intCurrentRow, 0, coin.DenominationID.ToString());
// fgdNav.Rows[intCurrentRow].IsNode = true;
//}
fgdNav.Rows.Count++;
intCurrentRow = fgdNav.Rows.Count - 1;
fgdNav.SetUserData(intCurrentRow, 0, coin.ID.ToString());
fgdNav.SetData(intCurrentRow, 6, coin.Year.ToString());
fgdNav.SetData(intCurrentRow, 7, coin.MintMark);
fgdNav.SetData(intCurrentRow, 8, intCurrentRow.ToString() + " " + coin.Variety);
fgdNav.Rows[intCurrentRow].UserData = coin.ID.ToString();
fgdNav.Rows[intCurrentRow].IsNode = true;
fgdNav.Rows[intCurrentRow].Height = 20;
fgdNav.Rows[intCurrentRow].Visible = true;
}
fgdNav.ResumeLayout();
The section that says ‘add denomination row if required’ - if i uncomment this, I get different results than if I don’t (much more rows will show, but still not all of them).
The version I am using is 6.0.20221.557. I noticed that there was an update, and I did install it and tested again but the same results.