Hi, we have the code below which uses "EditorControl" Property, but it's marked "EditorControl" property is deprecated, so which property should we use to replace it ?
foreach (var thisColumn in selectedRow.Band.Columns) { if (thisColumn.EditorControl != null && thisColumn.EditorControl is UltraCombo_Custodian) { ((UltraCombo_Custodian)thisColumn.EditorControl).Last_Saved_Value = selectedRow.GetCellValue(thisColumn.Key); } }
If you know for sure that the object you assigned to the EditorComponent property is a Control, you can upcast to that type and set the Visible property like that:
Control control = foundColumn.EditorComponent as Control;if ( control != null ){ Control.ControlCollection bindingContainer; bindingContainer.Add ( control );}
Hi, Mike.
I couldnt' simply replace EditorControl with EditorComponent. for example, EditorControl has "visible" property but EditorComponent doesn't . And we had a Controlcollection and add EditorControls into it, but how do we achieve that if EditorComponent ? Please see below the code we are using which we cant' change to EditorComponent.
e.g.1
foundColumn.EditorControl.Visible = false;
e.g.2
Control.ControlCollection bindingContainer;
bindingContainer.Add ( foundColumn.EditorControl );
Can you help ?
If you read the entire message, it says: "This property has been deprecated; use the EditorComponent property instead."
So... use the EditorComponent property, instead.
Use the ValueList propety for the cell (or Column) instead of EditorControl.