Hi,
I'm using the Q3 release of the GridView for Silverlight and for some reason I cannot get any of the formatting to work. For example in this column, I'm setting both the DataFormatString as well as a custom converter and neither of them work. The only way I can get the formatting to work is to add it to the DataLoaded event but then because the data has already been loaded, the formatting is only applied when I reload the data. How can I set the formatting in the XAML???
XAML:
<
telerikGrid:GridViewDataColumn IsReadOnly="True"
Header="Start" DataMemberBinding="{Binding CONTRACT_START,Converter={StaticResource dateConverter}}" DataFormatString="{}{0:d}" />
DataLoaded Event:
RadGridView
grid = (RadGridView)sender;
for (int x = 0; x < grid.Columns.Count; x++)
{
if ((((GridViewDataColumn)grid.Columns[x]).DataType == typeof(DateTime)))
{
GridViewDataColumn gvdc = (GridViewDataColumn)grid.Columns[x];
if (gvdc.DataMemberBinding.Converter == null)
{
gvdc.DataMemberBinding.Converter =
new DateConverter();
}
}
}
