473,383 Members | 1,832 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

How to determen the position of a column in the collection columns

JR
hi,

I tryd this one but it dosn't work

lv.Columns.IndexOf(lvch)

where lv is my listview and lvch is the columnheader of the listview

thanks
Nov 21 '05 #1
4 1022
ColumnHeader.Index

"JR" <XX***@XX.XX> wrote in message
news:u0*********************@phobos.telenet-ops.be...
hi,

I tryd this one but it dosn't work

lv.Columns.IndexOf(lvch)

where lv is my listview and lvch is the columnheader of the listview

thanks

Nov 21 '05 #2
JR
won't work when the AllowColumnReorder property is set to true

"Siva M" <sh******@online.excite.com> schreef in bericht
news:u2**************@TK2MSFTNGP15.phx.gbl...
ColumnHeader.Index

"JR" <XX***@XX.XX> wrote in message
news:u0*********************@phobos.telenet-ops.be...
hi,

I tryd this one but it dosn't work

lv.Columns.IndexOf(lvch)

where lv is my listview and lvch is the columnheader of the listview

thanks

Nov 21 '05 #3
With .NET Framework you can use the ColumnHeader.DisplayIndex property. With
..NET Framework 1.x, you need to use the Win32 API for the ListView control,
LVM_GETCOLUMNORDERARRAY message or similar (see the docs).

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com

"JR" <XX***@XX.XX> escribió en el mensaje
news:Wy*********************@phobos.telenet-ops.be...
won't work when the AllowColumnReorder property is set to true

Nov 21 '05 #4
JR
thanks now It works

"Carlos J. Quintero [VB MVP]" <ca*****@NOSPAMsogecable.com> schreef in
bericht news:ug**************@TK2MSFTNGP12.phx.gbl...
With .NET Framework you can use the ColumnHeader.DisplayIndex property.
With .NET Framework 1.x, you need to use the Win32 API for the ListView
control, LVM_GETCOLUMNORDERARRAY message or similar (see the docs).

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com

"JR" <XX***@XX.XX> escribió en el mensaje
news:Wy*********************@phobos.telenet-ops.be...
won't work when the AllowColumnReorder property is set to true


Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: tomi | last post by:
Hi I have following problem. I have a datatable filled with some data. Each row holds its ID (column named "Row_ID") DataTable dtTable; I have a datagrid to which I assign this datatable....
1
by: miqbal | last post by:
How can I loop through the columns collection in client side javascript? Or how can I get a column by the key, not just by the index in the collection? in Infragistics webgrid Thanks
9
by: Steve | last post by:
How I can remove an AutoGenerated column? I wnat to inlcude the primary key in the resultset for creating some custom LinkButtons, but I don't want it (the PK) displayed in the DataGrid. I tried...
5
by: Steve Bugden | last post by:
Hi, I would like to set the column widths in the ASP.NET GridView control at runtime I have tried the following: http://msdn2.microsoft.com/en-us/library/ms178296.aspx Which uses the...
4
by: gane | last post by:
Hi, I am creating datagrid bound column dynamically and need to check if a datagrid column already exists?Is there a way to check this? thanks gane
7
by: GaryDean | last post by:
(one of our developers posted this and it got no answer so I'm giving it another try) I'm converting a DataGrid utility component that previously used the columns array to function as it has in...
0
by: Mike | last post by:
Hey everyone... I've got three problems with a custom DataGridView column I've built following the "How To: Host Controls in Windows Forms DataGridView Cells" article. The base editing control...
5
by: Romulo NF | last post by:
Greetings, I´m back here to show the new version of the drag & drop table columns (original script ). I´ve found some issues with the old script, specially when trying to use 2 tables with...
0
by: Radu | last post by:
Hi. I'm trying to read the structure of some Excel 2000 file that the user is expected to upload. The file must be an excel file (solved) and it must contain a column named "PIN". That's all. Now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.