borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (how to sort the datagrid when i will click on any column header ?)Next Topic (what is com+ and what is difference between com and com+ ?) New Topic New Poll Post Reply
AndreaVB Forum : VB.Net : got problem working with listview ?
Poster Message
tri_inn
Level: Regular User
Registered: 26-08-2002
Posts: 395

icon got problem working with listview ?

when we add column header in listview then an extra column header is automatically added when view property is detail.say suppose i add two column header, view property is detail and set header text first and second then a extra header text less header column is automatically added.how could i fix the bug.if it is possible for any one then please give me small sample code to implement it using vb.net.

12-12-2003 at 12:03 PM
View Profile Send Email to User Show All Posts | Quote Reply
Chris_871
Level: Master


Registered: 30-11-2002
Posts: 106
icon Re: got problem working with listview ?

Hi

U can just increase the last column's width dynamically. I have given a small code which may help u.


Dim col, i As Integer
Dim colwidth As Double
col = ListView1.Columns.Count
For i = 0 To col - 1
      colwidth = colwidth + ListView1.Columns(i).Width
Next
ListView1.Columns(col - 1).Width = ListView1.Columns(i - 1).Width + (ListView1.Width() - colwidth) - 5

by
Chris

14-12-2003 at 06:22 PM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : VB.Net : got problem working with listview ?
Previous Topic (how to sort the datagrid when i will click on any column header ?)Next Topic (what is com+ and what is difference between com and com+ ?) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder