![]() |
|
GTP.NET FAQ 10442Changing single Cells font color based on a rule Please note that this article
refers to the GTP.NET Jump to article- 2007-05-28 10:19:00 - Email plexityHide Question I have a procedure that fills timeItems in the dateScaler (from dataset)... private void fillGridItems... GridNode gn=gantt1.Grid.GridStructure.RootNodes.AddNode(); . TimeItem ti1=gr.Layers[0].AddNewTimeItem(); . After filling all items, user can click on date scaler and insert new time items. (add new rows in the same dataset) My question is...i'm counting how many time items every employee has for every day. If that number > 9, I would like FontColor in the grid for that employee to be Color.Red. I was trying something like this gantt1.Grid.GridStructure.RootNodes[0].GetCell(0).Layout.CellLayouts[0].Font gantt1.Grid.GridStructure.RootNodes[0].Nodes.Columns[0].ColumnCell.Layout.Fo gantt1.Grid.GridStructure.RootNodes[0].Nodes.Columns[0].ColumnCell.Layout=ga when I fill items from the database I can reference the column with i want to avoid calling the same procedure (fillGridItems) and making cell.layout and then adding to cell.layouts ... if it is possible only change the color of the text in the grid Answer The CellLayout is used by multiple cells. One way to reach your desired result is to create a new CellLayout for each cell like this Or why not add your needed celllayouts in design time to the Gantt.CellLayouts collection and then in runtime assign the correct one like this GetCell(0).Layout = Gantt.CellLayouts.GetFromName("OverWorked");
|
"This is too GREAT. I must say you have strong support and really good programmers at your place. Your entire team is good. Just Fantastic! – 100%" |
| ? 1999-2006 PlexityHide.com Grastensvagen 24, S-163 45 Spanga Sweden E-mail: support@plexityhide.com |