Hello,
We have Q3 2012.
I'm trying to use a static property to specify the ResultFormatString for an AggregateFunction,
<telerik:GridViewDataColumn.AggregateFunctions> <telerikData:SumFunction ResultFormatString="{x:Static l:CustomFormat.CurrencyWithMinus}"/> </telerik:GridViewDataColumn.AggregateFunctions>
But the property's value (e.g. $#,##0.00) is displayed as a literal in the gridview cell.
We can't use the string format "c" because we need negative values to be prefixed with "-"
rather than having parentheses around them. Can you please tell me if there's some way to make this work?
Thanks much!
<
telerik:RadTreeView
Name
=
"Nodes"
IsEditable
=
"True"
IsLoadOnDemandEnabled
=
"True"
ItemTemplate
=
"{StaticResource ItemTemplate}"
ItemEditTemplate
=
"{StaticResource EditTemplate}"
IsDragDropEnabled
=
"True"
telerik:TreeViewSettings.DragDropExecutionMode
=
"New"
telerik:RadDragAndDropManager.AllowDrop
=
"True"
telerik:RadDragAndDropManager.AllowDrag
=
"True"
...>
<
i:Interaction.Triggers
>
<
commands:DragDropQueryRoutedEventTrigger
EventName
=
"DropQuery"
EventOwnerType
=
"{x:Type telerik:RadDragAndDropManager}"
>
<
micro:ActionMessage
MethodName
=
"OnDropQuery"
>
<
micro:Parameter
Value
=
"$eventArgs"
/>
</
micro:ActionMessage
>
</
commands:DragDropQueryRoutedEventTrigger
>
</
i:Interaction.Triggers
>
</
telerik:RadTreeView
>
public
void
OnDropQuery(DragDropQueryEventArgs args)
{
...
...
args.Handled =
true
;
}
grdRiskClarityReport.Export(stream,
new GridViewExportOptions()
{
Format=
ExportFormat.Html,
ShowColumnHeaders =
true,
ShowColumnFooters =
true,
ShowGroupFooters =
false,
});
private void grdRiskClarityReport_ElementExported(object sender, GridViewElementExportedEventArgs e)
{
if (e.Element == ExportElement.HeaderCell && temp== 0)
{
// if (obj != null)
{
e.Writer.Write(
String.Format(@"<tr><td style=""background-color:#CCC;"" colspan=""{0}"">","dfdfd"));
e.Writer.Write(
String.Format(@"<b>Proposal Name:</b> {0} <br />", "dfdfd")); //need to input properdata
e.Writer.Write(
String.Format(@"<b>Proposal Status:</b> {0} <br />", "dfdfd"));
e.Writer.Write(
"</td></tr>");
temp = 1;
// using the restrict the metadata to the first cell
}
}
}