Avatar of Zoplax
Zoplax
 asked on

GridView - Text alignment in Edit mode?

I have a GridView with TemplateField objects in which I'm setting the ItemStyle-HorizontalAlign so that the text in the cell appears right-justified.

Is it possible to make it so that the text in my GridView cell is right-justified in Edit mode, and if so how can I set this programmatically?  
<asp:TemplateField HeaderText="Rate/Adder" ControlStyle-Width="100" ItemStyle-HorizontalAlign="Right">
     <ItemTemplate>
          <asp:TextBox id="txtBlendAdderValue" Text='<%# Bind("BlendAdderValue") %>' AutoPostBack="true" OnTextChanged="txtBlendAdderValue_TextChanged" Columns="40" MaxLength="255" CssClass="form" runat="server" />                                                       
     </ItemTemplate>
</asp:TemplateField>

Open in new window

.NET ProgrammingASP.NETASP

Avatar of undefined
Last Comment
Zoplax

8/22/2022 - Mon
CtrlAltDl

I'm pretty sure  ItemStyle-HorizontalAlign="Right" would align all template fields.
ASKER CERTIFIED SOLUTION
CtrlAltDl

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Zoplax

ASKER
Thanks, I ended up having to add this in within the textbox object's tag.  For some reason even though I applied it via my css stylesheet, the change wouldn't take; I'm guessing it may've been overridden by other style settings in parent containers (I saw something about placeholder containers' styles sometimes showing this behavior).
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23