Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / General / September 2007



Tip: Looking for answers? Try searching our database.

rearrange the order of columns present in Listview

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Valli - 30 Sep 2007 13:00 GMT
Hi

I want to rearrange the order of columns present in Listview during runtime.
What property must be set to do this?
Can anyone help me...

Thanks & Regards
Valli
MikeD - 30 Sep 2007 13:46 GMT
> Hi
>
> I want to rearrange the order of columns present in Listview during
> runtime. What property must be set to do this?
> Can anyone help me...

You can only do this with the VB6 version (you *can* do it with the VB5
version, but it requires the Win32API)....set the AllowColumnReorder
property to True.  This allows the user to drag and drop columns.  To
programmatically reorder columns, set the Position property of the
ColumnHeader object.

In the future, you might want to spend a few minutes browsing the properties
yourself.  This one should have stuck out like a sore thumb (unless per
chance you're using the VB5 version, then I can understand).  Also, just for
future reference, you should always tell us what version of VB and in the
case of the Windows Common Controls OCXs, its version as well. That way, we
don't have to make guesses and assumptions.

Signature

Mike
Microsoft MVP Visual Basic

Valli - 30 Sep 2007 14:20 GMT
Hi,

Thanks for your help.

I know that Allowcolumnreorder property must be used. Since I used the
comctl32.ocx version, this property is not enabled
and it couldnt strike for me that I am using the comctl32.ocx .
With your answer I altered to mscomctl.ocx. I got Allowcolumnreorder
Property enabled.

Signature

Regards
Valli

>> Hi
>>
[quoted text clipped - 14 lines]
> VB and in the case of the Windows Common Controls OCXs, its version as
> well. That way, we don't have to make guesses and assumptions.
Randy Birch - 30 Sep 2007 17:53 GMT
You can do it with the VB5 control :
http://vbnet.mvps.org/code/comctl/lvcolumnreoder.htm

Signature

Randy Birch
MS MVP, Visual Basic
http://vbnet.mvps.org/

Please respond to the newsgroups so all can benefit.

Hi,

Thanks for your help.

I know that Allowcolumnreorder property must be used. Since I used the
comctl32.ocx version, this property is not enabled
and it couldnt strike for me that I am using the comctl32.ocx .
With your answer I altered to mscomctl.ocx. I got Allowcolumnreorder
Property enabled.

Signature

Regards
Valli

>> Hi
>>
[quoted text clipped - 14 lines]
> VB and in the case of the Windows Common Controls OCXs, its version as
> well. That way, we don't have to make guesses and assumptions.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.