Last post May 17, 2019 01:33 PM by TimothyV
May 16, 2019 04:34 PM|TimothyV|LINK
Hi, the GridView has gridlines and I am trying to show something similiar to that in the ListView. Can anyone please help?
May 16, 2019 05:14 PM|PatriceSc|LINK
Depends which kind of HTML elements you are showing in your ListView.
For example you could use https://www.w3schools.com/css/css_border.asp (a gridview renders table cells and what you see is the border of those cells) or a https://developer.mozilla.org/fr/docs/Web/CSS/box-shadow etc...
May 17, 2019 05:58 AM|samwu|LINK
When the Gridview is displayed on the client side, it is rendered as a table,so you can add a Table in the ListView according to the style.
I wrote a demo that you can use as a reference.
<asp:ListView ID="ListView1" runat="server">
<table border="1" style="border-collapse:collapse;">
<asp:PlaceHolder runat="server" ID="itemPlaceholder" />
May 17, 2019 01:29 PM|TimothyV|LINK
PatriceSc, thank you. I am trying to make it work with those methods. I was hoping for an example. Thanks for your response and have a great day!
May 17, 2019 01:33 PM|TimothyV|LINK
Sam, thank you so much! What a simple and clean solution. Embarrassingly easy. Have a great day!