Showing list of formname in a listview
can anybody tell me .Why i am getting Invalid Property Value ?.Kindly let me know the idea.Any help would be highly appreciated.here is the following code
What i have written.
Code:
Public Function FillListView()
Dim item As ListItem
Set item = ListView1.ListItems.Add(, , "item")
item.SubItems(1) = "frmSupplier"
End Function
Re: Showing list of formname in a listview
~Edit~:
The problem is, there is no subitems found... Right click the listview and select properties. Then select Column Headers tab. Then click the Insert Column button(do it again for creating another column). Then try the code.
Re: Showing list of formname in a listview
Still not working it say Compiler Error .syntax Error .Kindly let me know the idea.Any help would be highly appreciated.Kindly find the attachment also.
Re: Showing list of formname in a listview
Please see the edited post above....
Re: Showing list of formname in a listview
Column is already added there .But still getting same Error .Kindly let me know the idea.Kindly find the attachment also.
Re: Showing list of formname in a listview
The 1st column is the listview Item's .Text property. The 2nd column is .SubItem(1), 3rd item is .SubItem(2), etc.
Re: Showing list of formname in a listview
Yeah... That means you have to create two columns...
Re: Showing list of formname in a listview
Just do this
Code:
Set item = ListView1.ListItems.Add(, , "frmSupplier")
Re: Showing list of formname in a listview
Quote:
Originally Posted by
firoz.raj
can anybody tell me .Why i am getting Invalid Property Value ?.Kindly let me know the idea.Any help would be highly appreciated.here is the following code
What i have written.
Code:
Public Function FillListView()
Dim item As ListItem
Set item = ListView1.ListItems.Add(, , "item")
item.SubItems(1) = "frmSupplier"
End Function
Try This it will work
Code:
Public Function FillListView()
ListView1.ColumnHeaders.Clear
ListView1.ColumnHeaders.Add , , "ITEM", 1444, lvwColumnLeft
ListView1.ColumnHeaders.Add , , "FORMNAME", 1444, lvwColumnRight
ListView1.View = 3
Dim item As ListItem
Set item = ListView1.ListItems.Add(, , "item")
item.SubItems(1) = "frmSupplier"
End Function
Re: Showing list of formname in a listview
I Want to place all the form names in a Column one but alll the form name is
not comming in a listview subitem(1).Here is the following Code What i have
written.Kindly let me know the idea.Any help would be highly appreciated.
Kindly find the attachment also.
Code:
Public Function FillListView()
ListView1.ColumnHeaders.Clear
ListView1.ColumnHeaders.Add , , "ITEM", 1444, lvwColumnLeft
ListView1.ColumnHeaders.Add , , "FORMNAMES", 1444, lvwColumnRight
'ListView1.ColumnHeaders.Add , , "FORMNAME", 1444, lvwColumnRight
'ListView1.ColumnHeaders.Add , , "FORMNAME", 1444, lvwColumnRight
ListView1.View = 3
Dim item As ListItem
Set item = ListView1.ListItems.Add(, , "item")
item.SubItems(1) = "frmSupplier"
item.SubItems(1) = "Frmpermissions"
item.SubItems(1) = "frmsupplierModify"
End Function
Re: Showing list of formname in a listview
I think there is miscommunication. Can you simply show us what it is suppose to look like on paper? No code, just typed out, spaced out?
Re: Showing list of formname in a listview
Try this : :wave:
Code:
Public Function FillListView()
ListView1.ColumnHeaders.Clear
ListView1.ColumnHeaders.Add , , "ITEM", 1444, lvwColumnLeft
ListView1.ColumnHeaders.Add , , "FORMNAMES", 1444, lvwColumnRight
ListView1.View = 3
Dim item As ListItem
Set item = ListView1.ListItems.Add(, , "item1")
item.SubItems(1) = "frmSupplier"
Set item = ListView1.ListItems.Add(, , "item2")
item.SubItems(1) = "Frmpermissions"
Set item = ListView1.ListItems.Add(, , "item3")
item.SubItems(1) = "frmsupplierModify"
End Function
Re: Showing list of formname in a listview
Quote:
Originally Posted by
firoz.raj
I Want to place all the form names in a Column one but alll the form name is
not comming in a listview subitem(1).Here is the following Code What i have
written.Kindly let me know the idea.Any help would be highly appreciated.
Kindly find the attachment also.
Code:
Public Function FillListView()
ListView1.ColumnHeaders.Clear
ListView1.ColumnHeaders.Add , , "ITEM", 1444, lvwColumnLeft
ListView1.ColumnHeaders.Add , , "FORMNAMES", 1444, lvwColumnRight
'ListView1.ColumnHeaders.Add , , "FORMNAME", 1444, lvwColumnRight
'ListView1.ColumnHeaders.Add , , "FORMNAME", 1444, lvwColumnRight
ListView1.View = 3
Dim item As ListItem
Set item = ListView1.ListItems.Add(, , "item")
item.SubItems(1) = "frmSupplier"
item.SubItems(1) = "Frmpermissions"
item.SubItems(1) = "frmsupplierModify"
End Function
im confused how many columns you want one or two if two than see ABC's code above if one column then Try this out and reply
Code:
Public Function FillListView()
ListView1.ColumnHeaders.Clear
ListView1.ColumnHeaders.Add , , "FormName", 1444, lvwColumnLeft
ListView1.View = 3
ListView1.ListItems.Add(1).Text = "frmSupplier"
ListView1.ListItems.Add(2).Text = "frmpermissions"
ListView1.ListItems.Add(3).Text = "frmsupplierModify"
End Function
Re: Showing list of formname in a listview
@agent: I think he wants two column and three rows... :)
Re: Showing list of formname in a listview
it is comming in three column. i need in one column.one after the other in a list.as a list.kindly let me know the idea.Any help would be highly appreciated.
Code:
ListView1.ListItems.Add(1).Text = "frmSupplier"
ListView1.ListItems.Add(2).Text = "frmpermissions"
ListView1.ListItems.Add(3).Text = "frmsupplierModify"
Re: Showing list of formname in a listview
Try this....
Code:
Dim item As ListItem
Set item = ListView1.ListItems.Add(, , "frmSupplier")
Set item = ListView1.ListItems.Add(, , "frmpermissions")
Set item = ListView1.ListItems.Add(, , "frmsupplierModify")
Re: Showing list of formname in a listview
Another version... :wave:
Code:
ListView1.View = lvwReport '~~~> Set the display type to report
ListView1.ColumnHeaders.Add , , "Forms", 1444, lvwColumnLeft '~~> Create one column
ListView1.ListItems.Add , , "frmSupplier" '~~> Add data to the column (ie. row)
ListView1.ListItems.Add , , "frmpermissions"
ListView1.ListItems.Add , , "frmsupplierModify"
1 Attachment(s)
Re: Showing list of formname in a listview
Quote:
Originally Posted by
firoz.raj
it is comming in three column. i need in one column.one after the other in a list.as a list.kindly let me know the idea.Any help would be highly appreciated.
Code:
ListView1.ListItems.Add(1).Text = "frmSupplier"
ListView1.ListItems.Add(2).Text = "frmpermissions"
ListView1.ListItems.Add(3).Text = "frmsupplierModify"
is this the o/p that you want the code is in the Screenshot i have created a new form and added a listview1 control on it and than the code