473,394 Members | 1,748 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,394 software developers and data experts.

Using ListView

I have three columns. How to add the data's row by row fashion.
Thanks in advance
Aug 8 '07 #1
7 3366
hariharanmca
1,977 1GB
I have three columns. How to add the data's row by row fashion.
Thanks in advance
corruption it's not "Data's". But it is "Data".

and you have to post what is your front-end versions?
Aug 8 '07 #2
Ya how to add data in row by row fashion in listview . My frontend version is vb6
Aug 8 '07 #3
hariharanmca
1,977 1GB
Ya how to add data in row by row fashion in listview . My frontend version is vb6
Expand|Select|Wrap|Line Numbers
  1. Dim lsItem As ListItem
  2.  
  3. <for loop>
  4.     ' am not sure about the AddItem perameters because i am gussing.
  5.     set lsItem = lvListViewName.AddItem(intIndexValue, Col0ValueToShow) 
  6.     lsItem.SubItem(1) = Col1ValueToShow
  7.     lsItem.SubItem(1) = Col2ValueToShow
  8.     lsItem.SubItem(1) = Col3ValueToShow
  9. <next>
if you get the concept you can do.

(Code not tested).
Aug 8 '07 #4
dim c as integer
c=1
do

loop while c<= listview1.listitems.count
Aug 24 '07 #5
Expand|Select|Wrap|Line Numbers
  1. Dim c As Integer
  2. Dim i As Integer
  3. c = 1
  4. For i = 0 To 5
  5.     listview1.ListItems.Add(c) = "sample data"
  6. Next i
Try this code, hope it can help.
Aug 24 '07 #6
pureenhanoi
175 100+
I have three columns. How to add the data's row by row fashion.
Thanks in advance
If you've loaded data into Recordset, so, do like this
Expand|Select|Wrap|Line Numbers
  1. Dim Rs as Recordset
  2. Dim lvItem as ListItem
  3. 'load data into Rs
  4. While Not Rs.EOF
  5.  Set lvItem  = ListView1.ListItems.Add(,,rs!field1)
  6.     lvItem.SubItem(1) = rs!field2
  7.     lvItem.SubItem(3) = rs!field3
  8.  Rs.MoveNext
  9. Wend
  10.  
Remember, add enought column for the Listview at design time.
Aug 25 '07 #7
hariharanmca
1,977 1GB
I have three columns. How to add the data's row by row fashion.
Thanks in advance

Go through This Article
Aug 25 '07 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: keith | last post by:
In a ListView control (two columns), I added a few ListView items. ListView listview=new ListView(); listview.Parent=this; listview.View=View.Details; listview.Columns.Add...
1
by: Prasad Karunakaran | last post by:
I am using the C# DirectoryEntry class to retrieve the Properties of an user object in the Active Directory. I need to get the First Name and Last Name as properties. I know it is not supported...
0
by: Art Guerra | last post by:
Any tips or information would be most appreciated! Here is my scenario simplified: I have a main application form (Form1) and on that form is a listView control. On a separate form (Form2), the...
1
by: tmaster | last post by:
Within a class, can I create a property that is a listview? Here's what I tried, but it doesn't seem to work: '------------ create property to give the second form access to the first form's...
0
by: Andre Viens | last post by:
Hello, I have a TreeView I'm using to navigate through various options shown in a ListView. I want to use the SelectedNode.Tag property to hold the items in my ListView. Everything is working...
0
by: Andre Viens | last post by:
Hello, I am using the following variation of code from <http://support.microsoft.com/default.aspx?scid=kb;EN-US;319340> to add icons to an imagelist for use in a listview: Private Structure...
4
by: gene kelley | last post by:
I had a VB6 app that used a third party ListView control to simply display various recordsets. The control had a VirtualMode which I used for this display. Now in VB2005, I want to do the same...
0
by: knk53 | last post by:
I am using a windows form with a simple listview control. The listview has 2 columns and displays text from a file. When the listview control has the focus, the user can use arrow keys, letters...
5
by: John Devlon | last post by:
Hi, Does anyone know how to get a value of a second column of a selected item in Listview. I've create a listview and added this code Listview.Items.Clear() Listview.Columns.Clear()...
4
by: Brian Gaze | last post by:
I have created a ListView control and have bound this to a datasource. Within the ItemTemplate of the ListView I have added another ListViewControl which is databound in the code behind. The idea...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.