<div dir="ltr"><div dir="ltr"><br></div><div dir="ltr"><div dir="ltr"><br></div><div dir="ltr"><div dir="ltr"><br></div><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno lun 10 ago 2020 alle ore 19:12 Rolf-Werner Eilert <<a href="mailto:rwe-sse@osnanet.de" target="_blank">rwe-sse@osnanet.de</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Just looked for a way to make some (not all) of the lines of a GridView <br>
somewhat thicker, for instance every second line or something like the <br>
line between Row 2 + 3 and Row 4 + 5.<br>
<br>
Is there a way to achieve that?<br></blockquote><div><br></div><div>You could do something like this (you can change the border as you want):<br><br>Public Sub Form_Open()<br><br> Dim b As New Border("style:none;right-style:solid;bottom-style:solid;left-style:solid;top-style:solid;color:orange;width:2;")<br> Dim hCont As Control<br><br> With GridView1<br> .Header = 3<br> .Columns.Count = 4<br> .Columns.Width = 120<br> .Columns[0].Text = "ID"<br> .Columns[1].Text = "NAME"<br> .Columns[2].Text = "SURNAME"<br> .Columns[3].Text = "DATE"<br> .Rows.Count = 10<br> End With<br> For r As Integer = 0 To GridView1.Rows.Max<br> If r Mod 2 = 0 Then GridView1.Rows[r].Border = b<br> Next<br><br>End<br><br>But if to load the data you use the _Data event (commanded by GridView1.Rows.Count) then you could remove the For loop from Open and insert this code inside Public Sub GridView1_Data (Row As Integer, Column As Integer):<br><br> Dim b As New Border("style:none;right-style:solid;bottom-style:solid;left-style:solid;top-style:solid;color:orange;width:2;")<br><br> If Row Mod 2 = 0 Then GridView1.Rows[Row].Border = b<br> <br>Regards<br>Gianluigi <br></div></div></div>
</div>
</div>
</div>