Mar 31, 2014, 3:11 AM
[CLOSED] Add code to localization grid header
Hi,
A long time ago I published posts to consult on the issue DisplayName:
http://forums.ext.net/showthread.php...-column-header
and attached on the code.
However, I missed some of the code, so it does not work well.Here I am attaching other codes.
1.MVC\MetadataAware\ColumnBaseAttribute.cs
Line 431
Line 73
A long time ago I published posts to consult on the issue DisplayName:
http://forums.ext.net/showthread.php...-column-header
and attached on the code.
However, I missed some of the code, so it does not work well.Here I am attaching other codes.
1.MVC\MetadataAware\ColumnBaseAttribute.cs
Line 431
column.Text = Regex.Replace(metadata.PropertyName, "([a-z])([A-Z])", "$1 $2");
to
if (!string.IsNullOrEmpty(metadata.DisplayName))
{
column.Text = metadata.DisplayName;
}
else
{
column.Text = Regex.Replace(metadata.PropertyName, "([a-z])([A-Z])", "$1 $2");
}
2.MVC\factory\tablepanelbuilder.csLine 73
column.Text = Regex.Replace(meta.PropertyName, "([a-z])([A-Z])", "$1 $2");
to if (!string.IsNullOrEmpty(meta.DisplayName))
{
column.Text = meta.DisplayName;
}
else
{
column.Text = Regex.Replace(meta.PropertyName, "([a-z])([A-Z])", "$1 $2");
}
I hope you will add the code in the next version to achieve localization, thank you!
Last edited by Daniil; Mar 31, 2014 at 11:57 PM.
Reason: [CLOSED]