PDA

View Full Version : [CLOSED] Set style for TextField



Digital.Dynamics
Jun 11, 2012, 9:49 AM
Hi,

We want to set a customized style for a textfield, text-align, background,..... (as an Editor in a GridPanel). We already tried before but without success.
We are using the plugin : RowEditor.



<style type="text/css">
.AlignRight
{
background-color: Green !important;
text-align:right !important;
}
</style>

<Plugins>
<ext:RowEditing ID="RowEditor1" runat="server" ClicksToEdit="2" SaveBtnText="Save"
ErrorSummary="false" CancelBtnText="Cancel">
</ext:RowEditing>
</Plugins>

<ColumnModel>
<Columns>
<ext:RowNumbererColumn ID="RowNumbererColumn1" runat="server" />

<ext:Column runat="server" ID="Job_ID" Text="Job_ID" Width="70" DataIndex="Job_ID"
Sortable="true" Hidden="true">
</ext:Column>
<ext:Column runat="server" ID="Job_Name" Text="Job_Name" Width="70" Align="Right"
DataIndex="Job_Name">
<Editor>
<ext:TextField ID="txfJob_Name" runat="server" AllowBlank="false" Cls="AlignRight">
</ext:TextField>
</Editor>
</ext:Column>
<ext:Column runat="server" ID="Job_Name_En" Text="Job_Name_En" Width="60" DataIndex="Job_Name_En"
Sortable="true">
<Editor>
<ext:TextField ID="txfJob_Name_En" runat="server" AllowBlank="false">
</ext:TextField>
</Editor>
</ext:Column>
<ext:Column runat="server" ID="Time_In" Text="Time_In" Width="60"
Sortable="true">
<Columns>
<ext:Column runat="server" ID="Time_IN_H" Text="Time_IN_H" Width="60" DataIndex="Time_IN_H"
Sortable="true" Align="Center">
<Editor>
<ext:NumberField ID="nbfTime_IN_H" runat="server" AllowBlank="false">
</ext:NumberField>
</Editor>
</ext:Column>
<ext:Column runat="server" ID="Time_IN_M" Text="Time_IN_M" Width="60" DataIndex="Time_IN_M"
Sortable="true" Align="Center">
<Editor>
<ext:NumberField ID="nbfTime_IN_M" runat="server" AllowBlank="false">
</ext:NumberField>
</Editor>
</ext:Column>
</Columns>
</ext:Column>
<ext:Column runat="server" ID="IsAttReq" Text="IsAttReq" Width="60" DataIndex="IsAttReq"
Sortable="true" Align="Center">
<Editor>
<ext:Checkbox ID="chxIsAttReq" runat="server">
</ext:Checkbox>
</Editor>
<Renderer Fn="Active_Column" />
</ext:Column>
</Columns>
</ColumnModel>

Daniil
Jun 11, 2012, 10:12 AM
Hi,

Please use

.AlignRight .x-form-field {
background-image: none;
background-color: green;
text-align: right;
}

Digital.Dynamics
Jun 11, 2012, 2:34 PM
Thanks Daniil. It works.

Mark as Closed.