Home - Forums-.NET - FlyGrid.Net (Windows Forms) - A few questions

FlyGrid.Net (Windows Forms)

.NET Datagrid - Fast, highly customizable, industry standards .NET data grid control for WinForms

This forum related to following products: FlyGrid.Net

A few questions
Link Posted: 14-Mar-2006 22:58
Hello,
We have a few questions\requests about FlyGrid:

1. Is it possible to have a gray checkbox (in a boolean column)?
We need this for example in a tree which has a boolean column, and we would like to indicate if a parent node has some children checked and some unchecked.

2. We have some cases with header cells that need to be merged together. For this we need the ability to merge cells, and to have a few fixed rows at the head of the grid. Is this possible? are you planning to add these features?

3. We have some cases in which we need to color a certain cell and not a whole column/row. Is there a way to change the properties of a certain cell? (also properties like bold font, enabled...). This is very important to us.

4. When a column is added to a grid it doesn't have default values and this makes the column behaviour strange. We solved this by giving default values to every column we add - but we think this can be fixed in the grid itself.

5. If we want to use the Editor column for opening a different dialog other than the default editor - how can we react to the button-pressing? We didn't find an event for this so we did it through the method. Is it possible to raise an  event when the button is pressed?

Thank you very much.
Link Posted: 15-Mar-2006 02:00
1. Is it possible to have a gray checkbox (in a boolean column)?
We need this for example in a tree which has a boolean column, and we would like to indicate if a parent node has some children checked and some unchecked.

Yes it is possible. See the code below for the three-state column:
[c#]
public class ThreeStateColumn : BooleanColumn
{
  [Falgs]
  public enum ThreeState
  {
     None = 0,
     Checked = 1,
     Grayed = 2
  }
  protected override CheckBoxState GetCheckBoxState(NodeBase node)
  {
     object value = GetValue(node);
     if (value is ThreeState)
          return (ThreeState)value;
     return base.GetCheckBoxState(node);
  }
}
//--------------------------------------------------
//usage example:
//this procedure adds two columns to the grid
//and fills grid with 4 nodes with 4 different values of ThreeState in the second column
//to show how to display three-state checkboxes
//--------------------------------------------------
private void FillGrid(FlyGrid flyGrid)
{
   flyGrid.Columns.Items.Add(new TreeViewColumn("Tree"))
   flyGrid.Columns.Items.Add(new ThreeStateColumn("State"))
   for(int i = 0; i < 3; i++)
   {
      object[] nodeValue = new object[]{"Node " + i.ToString(), (ThreeStateColumn.ThreeState)i}
      flyGrid.Rows.Items.Add(new TreeViewNode(nodeValue));
   }
}

See the screenshot:


2. We have some cases with header cells that need to be merged together. For this we need the ability to merge cells, and to have a few fixed rows at the head of the grid. Is this possible? are you planning to add these features?

We're planning to implement column bands that will solve this problem. User can build different layouts of rows (and imitate cells merging).
This feature and fixed rows feature will implemented in the next major version of FlyGrid that we're planning to release at the end of April.
3. We have some cases in which we need to color a certain cell and not a whole column/row. Is there a way to change the properties of a certain cell? (also properties like bold font, enabled...). This is very important to us.

See the Spreadsheet sample. Try to select block of cells and specify backcolor, forecolor or font for the selected block of cells.
See the screenshot:
Link Posted: 15-Aug-2007 19:35
Are merged column headers available in the latest release?
Link Posted: 16-Aug-2007 00:02
Not yet. Hoping to get it in the 2.0 version.