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: