Hi,
I have the code:
foreach(Field field in obj.Fields)
{
Infragistics.Calculations.NamedReference reference = new Infragistics.Calculations.NamedReference() { ReferenceId = field.Name, Category = "Data Fields" };
ControlCalculationSettings calcSettings = new ControlCalculationSettings();
calcSettings.ReferenceId = field.Name;
calcSettings.TreatAsType =typeof(double);
_calculationManager.NamedReferences.Add(reference);
}
The code adds new ReferenceId under the Name Reference Category.
I was wondering if I can create my own category called "Custom" instead of Named References or Controls and add everything under that category?
Thanks,
That is currently not supported. You can change the name of the "Named References" category by registering a new value for the "Operand_Category_NamedReferences" resource string, but you cannot add new nodes which are siblings to the "Named References" or "Controls" nodes. I have forwarded this post to the Developer Support Manager to create a feature request on your behalf.
BTW, that string must be registered with the XamCalculationManager assembly, not the XamFormulaEditor assembly.
can you please create an example for me how to replace the name of the "Named References" category with something else.
--Andrei
Hello Andrei,
Thank you for your reply. I have created a sample application for you, that shows how you can implement the approach that Mike has suggested.
Please let me know if you need any further assistance on the matter.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
thank you that help alot. I am able to hide the controls category by doing this:
(xdt.ItemsSource as FilteredCollection<OperandInfo>).ApplyFilter(t => t.Name != "Controls");
I am wondering if it's a way to hide the "All" category under the Named References?
Thank you!