Completed
Last Updated: 31 Mar 2014 10:11 by ADMIN
ADMIN
Ralitsa
Created on: 17 Dec 2013 06:13
Category: GridView
Type: Bug Report
0
FIX. RadGridView - setting the Text property of a SummaryCell in the ViewCellFormatting event, the text is not visible
To reproduce: 
1. Add RadGridView with 3 columns and add summary row 
2. When is fired the ViewCellFormatting event, set the Text property of GridSummaryCellElement 
3. Run project and text is not visible. 

void radGridView1_ViewCellFormatting(object sender, CellFormattingEventArgs e) { GridSummaryCellElement summaryCell = e.CellElement as GridSummaryCellElement; if (summaryCell != null) { if (summaryCell.ColumnInfo.FieldName == "ProductID") { summaryCell.Text = "Total"; } } }

Workaround: 
Set FormatString property instead Text 
property void radGridView1_ViewCellFormatting(object sender, CellFormattingEventArgs e) { GridSummaryCellElement summaryCell = e.CellElement as GridSummaryCellElement; if (summaryCell != null) { if (summaryCell.ColumnInfo.FieldName == "ProductID") { summaryCell.FormatString = "Total"; } } }
0 comments