DetailsView separator image between two rows
I'm trying to use DetailsView of asp.net to display data in the following format:
Name: Adam
Age: 18
Gender: M
And I wanted to add a lines (gray image) between each two rows
(something like:)
Name: Adam
Age: 18
Gender: M
I managed to put the image as another row between each two rows, but it make it start only on the second 开发者_高级运维column (of the data) because the first column "saved" for the header (which is empty)
anyone knows how can put the image between the rows and make it "use" the whole line?
P.S
I did what I did using:
<asp:TemplateField>
<ItemTemplate>
<img src="../Images/thin_grey_separator.png" alt=""/>
</ItemTemplate>
</asp:TemplateField>
You can try to accomplish this task by a manipulation the styles:
<style type="text/css">
tr.spacer td { padding-bottom: 10px; }
</style>
<asp:DetailsView ...>
<RowStyle CssClass="spacer" />
</asp:DetailsView>
精彩评论