I am back for a another go at this and i hope that because i have upgraded to 18.1 i will get a better result
I have a working ICustomSummaryCalculator which adds an "Alway On" summary to my columns
Users would like this ICustomSummaryCalculator to be added as an option in your summary selector (activated via the sigma button)
Is there any way to do this that does not invole me writing a ton of replacement UI code that basicaly would emulate what you ahve already done
I saw some way to do it with some Web.UI version and some custom summary editor in ASP land so it got my hopes up for c#www.infragistics.com/.../webdatagrid-adding-custom-summary
If the answer is still NO could you tell me how to hide my ICustomSummaryCalculator with out removing itHINT - "SummarySettings.Hidden=false;" does not do anything, it still shows
All appendages crossed here
Bryan
Every time i try to thank you it gets flagged as abusive - 5th time now
I have reported this directlyI will keep pasting my thank you until someone stops deleteing it - i wont give in
Thank you very much for helping me Ok saved me weeks of work because i dont get time to learn all the extra bits of ehancing your controls
I converted the relevant bits to C++/CLI (code at the end to help people in c++ land) I added my RMS ICustomSummaryCalculator as a Summary::Custom and it worked perfectly
All i have to do now is add all my other Custom Summaries and im done
Code below to help C++ people in the future
// Thanks to infragistics team void ultraGrid1_BeforeSummaryDialog(System::Object^ sender,Infragistics::Win::UltraWinGrid::BeforeSummaryDialogEventArgs^ e) { // Find the controls we need on the existing dialog. Control ^summaryControl=e->SummaryDialog->Controls["SummaryControl"]; Control ^backgroundPanel=summaryControl->Controls["ultraBackgroundPanel"]; Control ^cancelUltraButton=backgroundPanel->Controls["cancelUltraButton"]; Control ^okUltraButton=backgroundPanel->Controls["okUltraButton"]; Control ^panelCheckboxes=backgroundPanel->Controls["panelCheckboxes"]; Control ^sumCheckBox=panelCheckboxes->Controls["sumCheckBox"]; bool exists; rmsCheckBox=gcnew CheckBox(); rmsCheckBox->Name="rmsCheckBox"; rmsCheckBox->Text="Rms"; //rmsCheckBox.Image = myImage; rmsCheckBox->SetBounds(sumCheckBox->Left,sumCheckBox->Bottom+4,sumCheckBox->Width,sumCheckBox->Height); exists=e->Column->Band->Summaries->Exists(e->Column->Key+":Rms"); if(exists)rmsCheckBox->Checked=true; // The dialog and the controls need to be shifted and resized to accomodate the new control. int heightAdjustment=rmsCheckBox->Height+4; panelCheckboxes->Height += heightAdjustment; e->SummaryDialog->Height += heightAdjustment; okUltraButton->Top += heightAdjustment; cancelUltraButton->Top += heightAdjustment; panelCheckboxes->Controls->Add(rmsCheckBox); } void ultraGrid1_AfterSummaryDialog(System::Object^ sender,Infragistics::Win::UltraWinGrid::AfterSummaryDialogEventArgs^ e) { OptimiseSummary ^os=gcnew OptimiseSummary(0); SummarySettings ^ss; bool exists; if(rmsCheckBox!=nullptr){ exists=e->Column->Band->Summaries->Exists(e->Column->Key+":Rms"); if(rmsCheckBox->Checked && !exists){ ss=e->Column->Band->Summaries->Add( e->Column->Key+":Rms",SummaryType::Custom,os,e->Column, SummaryPosition::UseSummaryPositionColumn,e->Column ); ss->DisplayFormat="Rms = {0}"; }else if(!rmsCheckBox->Checked && exists){ ss=e->Column->Band->Summaries[e->Column->Key+":Rms"]; e->Column->Band->Summaries->Remove(ss); } rmsCheckBox=nullptr; } }
Thank you all again
Hi Bryan, :) It's okay, I can see your post, now. Even if it gets flagged by the automated system, it just goes into a hold until a moderator reviews it. :) Anyway, I'm glad you got what you needed.
:¬) i think they get deleted when i press verify answer tso i wont do that again :¬)
byeeeee