Hi Team,
I am binding grid to the out put of a stored procedure on page load.
I see some dummy blank rows getting added. Can you please let know on how i can remove this.
[ I have checked my stored procedure and it is not returning any blank row]
***********************************
I am adding the summary row like this. The below code is in page load.
GridViewSummaryItem Additional_Pipeline_Needed = new GridViewSummaryItem("Additional_Pipeline_Needed", "{0}", GridAggregateFunction.Sum); GridViewSummaryItem Next_Year_Backlog = new GridViewSummaryItem("Next_Year_Backlog", "{0}", GridAggregateFunction.Sum); GridViewSummaryItem Next_Year_Weighted_Pipeline = new GridViewSummaryItem("Next_Year_Weighted_Pipeline", "{0}", GridAggregateFunction.Sum); GridViewSummaryRowItem summaryRowItem = new GridViewSummaryRowItem(new GridViewSummaryItem[] { ,Additional_Pipeline_Needed,Next_Year_Backlog,Next_Year_Weighted_Pipeline}); this.rgvSummaryReport.SummaryRowsBottom.Add(summaryRowItem);private void radgrid_ViewCellFormatting_1(object sender, CellFormattingEventArgs e)
{
GridSummaryCellElement cell = e.CellElement as GridSummaryCellElement;
if (e.CellElement != null)
{
if (e.CellElement.Text.Contains("$-"))
{
e.CellElement.Text = e.CellElement.Text.Replace("$", "").Replace("-", "($") + ")";
e.CellElement.TextAlignment = ContentAlignment.MiddleRight;
}
}
}
private void radgrid_CellFormatting(object sender, CellFormattingEventArgs e)
{
GridSummaryCellElement cell = e.CellElement as GridSummaryCellElement;
if (e.CellElement != null)
{
if (e.CellElement.Text.Contains("$-"))
{
e.CellElement.Text = e.CellElement.Text.Replace("$", "").Replace("-", "($") + ")";
e.CellElement.TextAlignment = ContentAlignment.MiddleRight;
}
}
}
private void HightlightText(string textToHighlight){ DocumentTextSearch search = new DocumentTextSearch(this.radRichTextBox1.Document); foreach (var textRange in search.FindAll(textToHighlight)) { this.radRichTextBox1.Document.Selection.AddSelectionStart(textRange.StartPosition); this.radRichTextBox1.Document.Selection.AddSelectionEnd(textRange.EndPosition); this.radRichTextBox1.ChangeTextHighlightColor(Color.Red); }}