Hello
I am facing problem in setting the columnset dynamically in ultratree,
Ex: I am modifing the node's columnset in one of the events after the initial columnset is setfor (int i = 0; i < nodes.Length && nodes[i] != "value"; i++) { node = GetNode(); } if (mapEntry.stringarray == null) { node.Cells["Value"].EditorComponent = GetVariableParameter(); node.Override.ColumnSet = this.Criterias.CriteriaTree.ColumnSettings.ColumnSets["STRING"]; node.Cells["Value"].Value = mapEntry.@string[1]; }//Designer ultraTreeNodeColumn31.AllowCellEdit = Infragistics.Win.UltraWinTree.AllowCellEdit.ActivateOnly; ultraTreeNodeColumn31.DataType = typeof(string); ultraTreeNodeColumn31.Key = "Err"; ultraTreeNodeColumn31.LayoutInfo.PreferredCellSize = new System.Drawing.Size(26, 24); ultraTreeNodeColumn32.AllowCellEdit = Infragistics.Win.UltraWinTree.AllowCellEdit.ActivateOnly; ultraTreeNodeColumn32.Key = "Field"; ultraTreeNodeColumn32.LayoutInfo.PreferredCellSize = new System.Drawing.Size(200, 24); ultraTreeNodeColumn33.AllowCellEdit = Infragistics.Win.UltraWinTree.AllowCellEdit.Full; ultraTreeNodeColumn33.DataType = typeof(string); ultraTreeNodeColumn33.Key = "Operator"; ultraTreeNodeColumn33.LayoutInfo.PreferredCellSize = new System.Drawing.Size(100, 24); ultraTreeNodeColumn34.AllowCellEdit = Infragistics.Win.UltraWinTree.AllowCellEdit.Full; ultraTreeNodeColumn34.DataType = typeof(string); ultraTreeNodeColumn34.Key = "Value"; ultraTreeNodeColumn34.LayoutInfo.PreferredCellSize = new System.Drawing.Size(150, 24); ultraTreeNodeColumn35.AllowCellEdit = Infragistics.Win.UltraWinTree.AllowCellEdit.Full; ultraTreeNodeColumn35.DataType = typeof(bool); ultraTreeNodeColumn35.Key = "Ask"; ultraTreeNodeColumn35.LayoutInfo.PreferredCellSize = new System.Drawing.Size(40, 24); ultraTreeNodeColumn36.AllowCellEdit = Infragistics.Win.UltraWinTree.AllowCellEdit.Full; ultraTreeNodeColumn36.Key = "Remove"; ultraTreeNodeColumn36.LayoutInfo.PreferredCellSize = new System.Drawing.Size(75, 24); ultraTreeNodeColumn54.Key = "Temp"; ultraTreeNodeColumn54.Visible = false; ultraTreeColumnSet6.Columns.Add(ultraTreeNodeColumn31); ultraTreeColumnSet6.Columns.Add(ultraTreeNodeColumn32); ultraTreeColumnSet6.Columns.Add(ultraTreeNodeColumn33); ultraTreeColumnSet6.Columns.Add(ultraTreeNodeColumn34); ultraTreeColumnSet6.Columns.Add(ultraTreeNodeColumn35); ultraTreeColumnSet6.Columns.Add(ultraTreeNodeColumn36); ultraTreeColumnSet6.Columns.Add(ultraTreeNodeColumn54); ultraTreeColumnSet6.Key = "STRING"; ultraTreeNodeColumn19.AllowCellEdit = Infragistics.Win.UltraWinTree.AllowCellEdit.ActivateOnly; ultraTreeNodeColumn19.Key = "Err"; ultraTreeNodeColumn19.LayoutInfo.PreferredCellSize = new System.Drawing.Size(26, 24); ultraTreeNodeColumn20.AllowCellEdit = Infragistics.Win.UltraWinTree.AllowCellEdit.ActivateOnly; ultraTreeNodeColumn20.Key = "Field"; ultraTreeNodeColumn20.LayoutInfo.PreferredCellSize = new System.Drawing.Size(200, 24); ultraTreeNodeColumn21.AllowCellEdit = Infragistics.Win.UltraWinTree.AllowCellEdit.Full; ultraTreeNodeColumn21.Key = "Operator"; ultraTreeNodeColumn21.LayoutInfo.PreferredCellSize = new System.Drawing.Size(100, 24); ultraTreeNodeColumn22.AllowCellEdit = Infragistics.Win.UltraWinTree.AllowCellEdit.Full; ultraTreeNodeColumn22.DataType = typeof(System.DateTime); ultraTreeNodeColumn22.Format = "dd/MM/yyyy hh:mm:ss"; ultraTreeNodeColumn22.FormatProvider = new System.Globalization.CultureInfo("fr-FR"); ultraTreeNodeColumn22.Key = "Value"; ultraTreeNodeColumn22.LayoutInfo.PreferredCellSize = new System.Drawing.Size(150, 24); ultraTreeNodeColumn23.AllowCellEdit = Infragistics.Win.UltraWinTree.AllowCellEdit.Full; ultraTreeNodeColumn23.DataType = typeof(bool); ultraTreeNodeColumn23.Key = "Ask"; ultraTreeNodeColumn23.LayoutInfo.PreferredCellSize = new System.Drawing.Size(40, 24); ultraTreeNodeColumn24.AllowCellEdit = Infragistics.Win.UltraWinTree.AllowCellEdit.Full; ultraTreeNodeColumn24.Key = "Remove"; ultraTreeNodeColumn24.LayoutInfo.PreferredCellSize = new System.Drawing.Size(75, 24); ultraTreeNodeColumn52.Key = "Temp"; ultraTreeNodeColumn52.Visible = false; ultraTreeColumnSet4.Columns.Add(ultraTreeNodeColumn19); ultraTreeColumnSet4.Columns.Add(ultraTreeNodeColumn20); ultraTreeColumnSet4.Columns.Add(ultraTreeNodeColumn21); ultraTreeColumnSet4.Columns.Add(ultraTreeNodeColumn22); ultraTreeColumnSet4.Columns.Add(ultraTreeNodeColumn23); ultraTreeColumnSet4.Columns.Add(ultraTreeNodeColumn24); ultraTreeColumnSet4.Columns.Add(ultraTreeNodeColumn52); ultraTreeColumnSet4.Key = "DATETIME";
before assigning the columnset["STRING"] , node had "DATETIME" as columnset valueAfter assigning though its displaying columnset as ["STRING"], its datatype is still "DateTime"
Could you please help me out?
(One more very strange thing if i debug (f10) indeed the datatype will also get changed to String, but if i just execute Datatype will set to "DATETIME" and Columnset "STRING")
Hello,
I wanted to know if you were able to solve your issue based on these suggestions or you still need help? Please let me know.
Hi Boris,
Thanks for your replyNow i am trying with a different approachIn my screen the Columnset has already been set for the ultratree , when the user modifies the column value i have to reset the columnset with the different columnset only for that node
Code: private void UtCriteriasCellValueChanged(object sender, CellValueChangedEventArgs e) { object modifiedValue = ((ISearchCriteria)node.Tag).PlaceHolder; ((ISearchCriteria)node.Tag).PlaceHolder = node.Cells["Value"].Value; node.Override.ColumnSet = this.Criterias.CriteriaTree.ColumnSettings.ColumnSets["STRING"]; node.Cells["Value"].EditorComponent = GetVariableParameter(); node.Cells["Value"].Value = (modifiedValue ?? "");}
when the line " node.Override.ColumnSet = this.Criterias.CriteriaTree.ColumnSettings.ColumnSets["STRING"]; "is executed, node.Cells["Field"] which had "First version" as the value is becoming null infact the entire rows cells is becoming null
Could you please help me out, its bit high proprity one
Thanks,Roopa
Hello Mike,
Yes, i meant datatype of the column,I have updated tree before accessing the cell value, still the new datatype of the columnset is not getting reflected
node.Override.ColumnSet = null;node.Override.ColumnSet = Criterias.CriteriaTree.ColumnSettings.ColumnSets[columnsetName];
Criterias.CriteriaTree.Update();node.Cells["Field"].Value = ((ISearchCriteria)node.Tag).Field;node.Cells["Value"].Value = (modifiedValue ?? "");
Thanks,roopa
Hello roopa,
I tried to reproduce this again and was not able to. Could you please try to attach a small sample project to your next post and will be happy to take a look at it.
I am checking about the progress of this issue. Please let me know If you need any further assistance on this.