Oct 21, 2014, 1:00 PM
[CLOSED] Date format in PropertyGrid
Hi,
I have a PropertyGrid (Ext.Net MVC 2.5.2) and some parameters (line in the grid) are of type date. The editor has the format I specified ("dd/MM/yyyy") but after I finish to edit (so after the editor is done) the format of the date become "MM/dd/yyyy". I have tried the solution from http://www.sencha.com/forum/showthre...n-PropertyGrid, I have put this in my page:
The PropertyGrid is very simple:
I have a PropertyGrid (Ext.Net MVC 2.5.2) and some parameters (line in the grid) are of type date. The editor has the format I specified ("dd/MM/yyyy") but after I finish to edit (so after the editor is done) the format of the date become "MM/dd/yyyy". I have tried the solution from http://www.sencha.com/forum/showthre...n-PropertyGrid, I have put this in my page:
<script>
if (Ext.grid.PropertyColumnModel) {
Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
nameText: "Nume",
valueText: "Valoare",
dateFormat: "dd/MM/yyyy"
});
}
</script>
The name of the columns "Name" and "Value" are changed with the names I supplied, but the date format remains wrong ("MM/dd/yyyy").The PropertyGrid is very simple:
Html.X().PropertyGrid()
.Title("<b>Atribute</b>")
.NameColumnWidth(400)
.ID("AttributesPropertyGrid" + entityId)
.Height(150)
The source is set on the server-side:var paramCollection = new PropertyGridParameterCollection();
var param = new PropertyGridParameter();
param.Name = attr.Name;
param.Editor.Add(new DateField() { Format = "dd/MM/yyyy" });
paramCollection.Add(param);
var attributesPropertyGrid = this.GetCmp<PropertyGrid>("AttributesPropertyGrid" + entityId.ToString());
attributesPropertyGrid.SetSource(paramCollection, true);
Thanks!
Last edited by Daniil; Oct 22, 2014 at 6:52 AM.
Reason: Please use [CODE] tags, [CLOSED]