473,706 Members | 2,303 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

List View Problem -"Argument out of range exception"

2 New Member
hi! Im new with VB.net and Im having prob with listview... "Argument out of range exception"
- the first time i had this, I was able to resolve it by changing the tabs on every textbox. But it appeared again after a day. Here's my code:
=======*****=== ===
If StudList.Select edItems.Count > 0 Then
Id = StudList.Select edItems(0).Text
UpdateRec.Show( )

UpdateRec.txtSt udNo.Text = StudList.Select edItems(0).SubI tems(0).Text
UpdateRec.txtEd uc.Text = StudList.Select edItems(0).SubI tems(36).Text >>start of the argument
UpdateRec.txtWo rk.Text = StudList.Select edItems(0).SubI tems(37).Text
UpdateRec.txtTr aining.Text = StudList.Select edItems(0).SubI tems(38).Text
UpdateRec.txtLi cense.Text = StudList.Select edItems(0).SubI tems(39).Text

End If
=====*****===== =
hope you could help me out
Sep 24 '16 #1
2 1171
308 Contributor
at what line of code you are getting an out of range exception, may I please know.

Sep 24 '16 #2
2 New Member
hi! It was on subitems(36)

I resolved it again by displaying the entire fields of my database in the List View.
.Add(Table.Rows (i)("Contact_Ph one"))
.Add(Table.Rows (i)("Medical_Co ndition"))
.Add(Table.Rows (i)("Education" ))
.Add(Table.Rows (i)("Work"))
.Add(Table.Rows (i)("Training") )
.Add(Table.Rows (i)("License"))

However, if you have more idea in resolving this matter, it would be greatly appreciated... I might encounter the same error again in the future.
Sep 26 '16 #3

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

Similar topics

by: Muhammad Aftab Alam | last post by:
Hi All, I need to know how can I make a list contorl like of windows explorer. From windows explorer view I mean when we open My Computer a list view is shown and the headers are shown as follows Files stored on This computer ----------------------------- (shared documents) (dotnetdocuments) Hard Disk drives
by: ksadek | last post by:
I have a list view that displays messages from a server over an Ip connection. I have set the list view to include a scrolling function, however, I can not figure out how to scroll to the last line automatically everytime a new message comes in from the server since the latest info from the server. Pretty much, I just need the list view to autmatically scroll to the bottom of the list view, rather than the top. ...
by: Praveen R | last post by:
Hi ! I am using a List view control to populate data onto. On the click event of the list view control, i need to find out whether the area clicked has any information of has no information. I basically need to either decide to add a new record or edit the existing record depending on whether data is available or not on the row where the mouse click was performed.
by: El Camino | last post by:
Ok, Picture this... I have a List view already fill with data I want to select one row in the list view with an ID that i retrieve later on in the process Basically its: I have an ID
by: Brian Henry | last post by:
Well here is the problem, I have a data set with about 9,000 to 20,000 people in it in the data table "people"... I am then reading it into a list view one at a time row by row... adding each person to the list view, well this works fine up to about 1,000 people then it start's to get really show putting the people in (a lot of process time used up)... does anyone know of any optimizations i could do to make this processess work a lot...
by: Brian Henry | last post by:
Here is another virtual mode example for the .NET 2.0 framework while working with the list view. Since you can not access the items collection of the list view you need to do sorting another way... here is my code on how I did it to help anyone starting out get an idea of how to use virtual mode in ..NET 2.0 Imports CrystalDecisions.CrystalReports.Engine Imports CrystalDecisions.Shared
by: Brian Henry | last post by:
So what is the easiest way to do this? I have one list view with a list of items (in detail view and with about 20 sub items) and a second list view that will take the items they drag from the first one to the second one. I tried this once a few years ago by trying to clone the list view item so i didnt have to recreate it, but ran into the problem of the item already had a parent... i dont want to remove the items from the first list when...
by: Miesha.James | last post by:
Hello, I've added a list view to a windows form and I want to add items and subitems to the list at runtime. The problem that I have is that when I try to use the list view control variable it throws the following error An unhandled exception of type 'System.NullReferenceException' occurred in RcvrStatusTest.exe
by: Mohit | last post by:
Hi all, I am working on a windows application with a list view on a form. Now I wanted to show hand cursor when mouse is over list view item and default(arrow) cursor at other places. List view's ItemMouseHover event can tell me that mouse is on the item and here I can change my cursor to hand. But I have no clue to change it back to default cursor when mouse is moved out of the list view item.
by: stevefromnaki | last post by:
Hi, I have a list of accounts in my list view. I total these and add a new item to the list view. I have changed the font on this to bold but is there a way to add a border around this one item only? I know it can be done in a datagridview, but can it also be done in a list view? Thanks for any help :)
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.