I have a custom control of a type xamdatagrid. I created a SummaryCalculator that I would like to attach to the custom control. How do I set the following in code:
<igDP:SummaryDefinition DisplayArea="BottomFixed" SourceFieldName="checkbox" Calculator="{markup:SelectedRecordsCalculatorMarkup}"/>
Or how can I create it in a style page and attach it to the custom control?
Also is there a way when using SummaryDefinitons.Add() to pass a field column index instead of a field column name?
Nevermind I figured it out by doing the following:
SelectedRecordsCalculator mySelectedCount = new SelectedRecordsCalculator();SummaryCalculator.Register(mySelectedCount);SummaryDefinition mySelectedCountDefinition = new SummaryDefinition();mySelectedCountDefinition.SourceFieldName="name"; mySelectedCountDefinition.Calculator = mySelectedCount; xamDataGrid1.FieldLayouts[0].SummaryDefinitions.Add(mySelectedCountDefinition);
I would still like to know is there a way I can set a fieldname by index instead of name. I don't like to do something like below because I won't know what the name is:
mySelectedCountDefinition.SourceFieldName="name";
Hello,
Currently there is only a SourceFieldName Property and it is not possible to set the Field's index, but if you want I can log a Product Idea on your behalf for adding such Property to the SummaryDefinition class.
Looking forward for your reply.
Yes please, thank you.
I have sent your Product Idea(SourceFieldIndex) directly to our product management team. Our product team chooses new Product Ideas for development based on popular feedback from our customer base. Infragistics continues to monitor application development for all of our products, so as trends appear in requested ideas, we can plan accordingly.
We value your input, and our philosophy is to enhance our toolset based on customer feedback. If your idea is chosen for development, you will be notified at that time. Your reference number for this Product Idea is PI13030094
If you would like to follow up on your Product Idea at a later point, you may contact Developer Support management via email. Please include the reference number of your Product Idea in the subject and body of your email message. You can reach Developer Support management through the following email address: dsmanager@infragistics.com