.grid-view
{
padding: 0;
margin: 0;
border: 1px solid #fff;
font-family: "Verdana, Arial, Helvetica, sans-serif, Trebuchet MS";
font-size: 0.9em;
}
.grid-view tr.header
{
color: Blue;
background-color: White;
height: 25px;
vertical-align: middle;
text-align: center;
font-weight: bold;
}
.grid-view tr.normal
{
color: Blue;
background-color: White;
height: 25px;
vertical-align: middle;
text-align: center;
}
.grid-view tr.alternate
{
color: White;
background-color: Blue;
height: 25px;
vertical-align: middle;
text-align: center;
}
.grid-view tr.normal:hover
{
background-color: Black;
color: White;
font-weight: bold;
}
.grid-view tr.alternate:hover
{
background-color: Black;
color: White;
font-weight: bold;
}
.grid-view tr.selected
{
background-color: Blue;
color: White;
font-weight: bold;
}
.grid-view tr.selected:hover
{
background-color: White;
color: Blue;
font-weight: bold;
}
<asp:GridView ID="gvShipping" runat="server" AutoGenerateColumns="False" DataKeyNames="TABLE"
OnRowCommand="gvShipping_RowCommand" Visible="False" GridLines="None"
Width="350px" BorderStyle="Solid" BorderWidth="1px" EnableModelValidation="True"
OnRowCreated="gvShipping_RowCreated"
onselectedindexchanged="gvShipping_SelectedIndexChanged"
onrowdatabound="gvShipping_RowDataBound" CssClass="grid-view">
<Columns>
<asp:TemplateField HeaderStyle-HorizontalAlign="Right"
HeaderText="Select Shipping Method">
<EditItemTemplate>
<asp:TextBox ID="textBox1" runat="server" Text='<%# Bind("DISPLAY") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="lblDisplay" runat="server" CommandName="Select"
Text='<%# Bind("DISPLAY") %>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:CommandField />
<asp:TemplateField HeaderStyle-HorizontalAlign="Right" HeaderText="Amount">
<EditItemTemplate>
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("AMOUNT") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="lblAmount" runat="server" Text='<%# Bind("AMOUNT") %>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Right" />
<ItemStyle HorizontalAlign="Right" Width="60px" />
</asp:TemplateField>
<asp:BoundField DataField="TABLE" HeaderText="Table" Visible="False" />
<asp:ButtonField CommandName="Select" HeaderStyle-HorizontalAlign="Right"
HeaderText="Select" Text="Select">
<HeaderStyle HorizontalAlign="Right" />
<ItemStyle HorizontalAlign="Right" Width="60px" />
</asp:ButtonField>
</Columns>
Been staring at this for a while. I think another pair of eyes could help me.
Tom
<EditRowStyle HorizontalAlign="Right" />
<HeaderStyle HorizontalAlign="Right" />
<RowStyle HorizontalAlign="Left" />
</asp:GridView>
Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
Connect with Certified Experts to gain insight and support on specific technology challenges including:
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE