本文介绍了网格线未显示在数据列表中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有以下数据列表
I have the following datalist
<table>
<asp:DataList runat ="server" ID ="carList" Width ="610px" RepeatDirection ="Vertical"
CellPadding ="1" GridLines ="Both" BorderColor ="Gray" BorderStyle ="Solid"
OnItemCommand ="carList_ItemCommand" OnSelectedIndexChanged ="carList_SelectedIndexChanged"
ItemStyle-Font-Names ="verdana" ItemStyle-Font-Size ="8pt" >
<HeaderTemplate>
<tr class ="datalisthead"><td >Car Id</td><td>Model</td><td>Year</td><td>Kms Run</td>
<td>Power Steering</td><td>Power Lock</td><td>Expected Price</td></tr>
</HeaderTemplate>
<ItemTemplate >
<tr class ="datalistitem ">
<td><asp:LinkButton ID="itemCarId" runat ="server" Height ="20px" CommandName ="select" BorderStyle ="None" Text ='<%# Eval("CarId") %>'></asp:LinkButton></td>
<td ><%# Eval("Make") %> <%# Eval("Model") %></td>
<td><%# Eval("YearMfd") %></td>
<td><%# Eval("Kilometers") %></td>
<td><%# Eval("PowerSteering") %></td>
<td><%# Eval("PowerLock") %></td>
<td><%# Eval("ExpectedPrice") %></td>
</tr>
</ItemTemplate>
<AlternatingItemTemplate >
<tr class ="alternateitem ">
<td><asp:LinkButton ID="itemCarId" runat ="server" Height ="20px" BorderStyle ="None" CommandName ="select" Text ='<%# Eval("CarId") %>'></asp:LinkButton></td>
<td><%# Eval("Make") %> <%# Eval("Model") %></td>
<td><%# Eval("YearMfd") %></td>
<td><%# Eval("Kilometers") %></td>
<td><%# Eval("PowerSteering") %></td>
<td><%# Eval("PowerLock") %></td>
<td><%# Eval("ExpectedPrice") %></td>
</tr>
</AlternatingItemTemplate>
<SelectedItemTemplate >
<asp:UpdatePanel ID="carUpdatePanel" runat ="server" >
<ContentTemplate >
<tr class ="selecteditem ">
<td><asp:LinkButton ID="itemCarId" runat ="server" Height ="20px" BorderStyle ="None" CommandName ="select" Text ='<%# Eval("CarId") %>'></asp:LinkButton></td>
<td><%# Eval("Make") %> <%# Eval("Model") %></td>
<td><%# Eval("YearMfd") %></td>
<td><%# Eval("Kilometers") %></td>
<td><%# Eval("PowerSteering") %></td>
<td><%# Eval("PowerLock") %></td>
<td><%# Eval("ExpectedPrice") %></td>
</tr>
<tr class ="selecteditem"><td colspan ="7" >
<asp:Table runat ="server" ID="table1" BorderWidth ="1px" GridLines ="None" Width ="180px" >
<asp:TableRow ><asp:TableCell >Exterior Color :</asp:TableCell><asp:TableCell ><%# Eval("ExteriorColor") %></asp:TableCell></asp:TableRow>
<asp:TableRow ><asp:TableCell >Interior Color :</asp:TableCell><asp:TableCell ><%# Eval("InteriorColor") %></asp:TableCell></asp:TableRow>
</asp:Table>
</td></tr>
</ContentTemplate>
</asp:UpdatePanel>
</SelectedItemTemplate>
</asp:DataList>
</table>
水平和垂直网格线未在带有链接按钮的列中显示.另外,其他列也未显示垂直网格线.谁能解决这个问题?在此先感谢.
The horizontal and vertical gridlines are not showing in the column with linkbutton. Also, other columns are not showing vertical gridline. can anyone solve the problem? Thanks in advance.
推荐答案
这篇关于网格线未显示在数据列表中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!