Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
907
Is there a way to show embedded editor as enabled and/or disabled for specific columns?
posted

I'm assigning a specific checkbox to each column on each node as I build out the tree.  I've configured up 2 check boxes, both have different back gorund colors, enabled, state, different checked appearance, etc...  Once the tree is populated, all of the check boxes appear the same though. :(

 

Below is the function I used to build a node.  Hmmm...  Seems, my white spacign was preserved on paste, sorry about that. :(

 

private UltraTreeNode CreateNode(AliObject aliObj, bool isSelected) {

//

// Determine which application we belong too and they add our business object to

// that app node, if the app doesn't exist yet, create a new node for it.

//

string appName = "Application (" + aliObj.GetApplicationName() + ")";

UltraTreeNode appNode = ultraTreeAliObj.GetNodeByKey(appName);

if (appNode == null) {

appNode = ultraTreeAliObj.Nodes.Add();

appNode.Cells[
"Name"].Value = appName;

appNode.Key = appName;

}

//

// For name we place the whole object in the cell so we can get the whole object later.

// The name will be displayed as the cell with use the ToString function on AliObject

// which returns the name.

//

List<string> folders = GetAllUriFolders(aliObj);

UltraTreeNode newNode = null;

UltraTreeNode baseNode = null;if (folders.Count > 0) {

baseNode = appNode;

foreach (string folder in folders) {

newNode = ultraTreeAliObj.GetNodeByKey(folder);

if (newNode == null) {

newNode = baseNode.Nodes.Add();

newNode.Cells[
"Name"].Value = GetFolderName(folder);

newNode.Key = folder;

//newNode.Cells["Include"].EditorControl.BackColor = Color.Gray; // doesn't work

newNode.Cells["Include"].Value = false;newNode.Cells["Include"].EditorControl = ultraCheckEditorDisabled;

}

baseNode = newNode;

}

newNode = baseNode.Nodes.Add();

}
else {

newNode = appNode.Nodes.Add();

}

newNode.Cells[
"Name"].Value = aliObj;newNode.Cells["Include"].Value = isSelected;

newNode.Key = aliObj.Uri;

newNode.Cells["Include"].EditorControl = ultraCheckEditorEnabled;

return newNode;

}