Hi,
Actually we have made Custom Summary Item for displaying helper text. But we are facing one issue we are displaying helper text in a summary row but that text got truncated from last (i.e. last few characters are missing when displayed).Please have look on below image to have good understanding of issue.
I am providing you the code which we have used. If you need any more information. Please let me know
Code:
Method to set summary row text
private void SetHelpText(string strHelpText)
{
if (this.SummaryRowsTop.Count == 0)
{
CustomSummaryStatusItem summaryItem = new CustomSummaryStatusItem(this.MasterTemplate.Columns[0].Name, strHelpText + "", GridAggregateFunction.Count);
GridViewSummaryRowItem summaryRowItem = new GridViewSummaryRowItem();
// Used to set cell value in GrdData_ViewCellFormatting
summaryItem.Name = "StatusText|" + strHelpText;
summaryRowItem.Add(summaryItem);
this.SummaryRowsTop.Add(summaryRowItem);
}
else
{
var summaryRowTop = this.SummaryRowsTop[0];
var summaryItem = summaryRowTop[0] as GridViewSummaryItem;
summaryItem.Name = "StatusText|" + strHelpText;
}
var summaryRowIndex = this.MasterView.SummaryRows.IndexOf(this.SummaryRowsTop[0]);
this.MasterView.SummaryRows[summaryRowIndex].PinPosition = PinnedRowPosition.Top;
this.MasterView.SummaryRows[summaryRowIndex].IsVisible = true;
this.MasterView.SummaryRows[0].PinPosition = PinnedRowPosition.Bottom;
this.MasterTemplate.BottomPinnedRowsMode = GridViewBottomPinnedRowsMode.Fixed;
}
Custom Summary Item:
public class CustomSummaryStatusItem : GridViewSummaryItem
{
public CustomSummaryStatusItem(string name, string formatString, GridAggregateFunction aggregate)
: base(name, formatString, aggregate)
{ }
public override object Evaluate(IHierarchicalRow row)
{
return 1;
}
}
Below Attached Image will help you to know more about issue. Please have a look on them.
Actual Text Dispalyed
Expected Text To Display
Thanks,
Shubham Jain