PDA

View Full Version : [CLOSED] Apply default Fields properties in FormPanel



Digital.Dynamics
Feb 28, 2013, 8:23 AM
Hi,

We want to apply all properties( in this case numberfield) in order to deactivate

hideTrigger
spinDownEnabled
spinUpEnabled




<%@ Page Language="C#" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{

}
</script>
<!DOCTYPE html>
<html>
<head runat="server">
<title>RTL - Ext.NET Examples</title>
<%--<link href="Resources/Css/examples.css" rel="stylesheet" />--%>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />
<ext:FormPanel ID="Panel3" runat="server" Title="Layout" Header="false" AnchorHorizontal="95%"
Frame="true">
<LayoutConfig>
<ext:VBoxLayoutConfig Align="Stretch" DefaultMargins="0" />
</LayoutConfig>
<FieldDefaults>
<CustomConfig>
<ext:ConfigItem Mode="Value" Name="spinDownEnabled" Value="false" />
<ext:ConfigItem Mode="Value" Name="spinUpEnabled" Value="false" />
<ext:ConfigItem Mode="Value" Name="hideTrigger" Value="true" />
</CustomConfig>
</FieldDefaults>
<Items>
<ext:NumberField ID="NumberField1" runat="server" />
<ext:NumberField ID="NumberField2" runat="server" />
<ext:NumberField ID="NumberField3" runat="server" />
<ext:NumberField ID="NumberField4" runat="server" />
</Items>
</ext:FormPanel>
</form>
</body>
</html>

</ext:FormPanel>



The trigger was hided but other properties are not.

Thanks

Vladimir
Feb 28, 2013, 9:24 AM
Hi,

- you need to use Mode="Raw" for boolean values
- try to replace FieldDefaults by Defaults (because FieldDefaults can be applied to late, when field is created already)



<Defaults>
<ext:Parameter Mode="Raw" Name="spinDownEnabled" Value="false" />
<ext:Parameter Mode="Raw" Name="spinUpEnabled" Value="false" />
<ext:Parameter Mode="Raw" Name="hideTrigger" Value="true" />
</Defaults>

Daniil
Mar 05, 2013, 4:03 AM
Hello,

According to this docs article, FieldDefaults can accept the Ext.form.Labelable mixin' options only.
http://docs.sencha.com/ext-js/4-1/#!/api/Ext.form.FieldAncestor-cfg-fieldDefaults

There are no spinDownEnabled, spinUpEnabled, hideTrigger options in the Ext.form.Labelable mixin.