[C#]
internal class NodeWithReadOnly : Node
{
private bool readOnly = false;
public bool ReadOnly
{
get
{
return readOnly;
}
set
{
readOnly = value;
}
}
}
Usage of this class:
[C#]
private void FillGrid(FlyGrid flyGrid)
{
//add nodes and mark odd nodes as ReadOnly
for(int i=0; i < 10; i++)
{
NodeWithReadOnly newNode = new NodeWithReadOnly("Node" + i.ToString());
newNode.ReadOnly = i % 2 > 0;odd nodes is readonly
flyGrid.Rows.Items.Add(newNode);
}
//connect to IsReadOnly event
flyGrid.IsReadOnly += new NodeBoolHandler(flyGrid_IsReadOnly);
}
private bool flyGrid_IsReadOnly(object sender, NodeBase node)
{
NodeWithReadOnly nro = node as NodeWithReadOnly;
return nro != null ? nro.ReadOnly : false;
}