I am trying to access data from list view using columnheader name but I get errors
LVProduct.FocusedItem.SubItems("Name").Text
So, how do you use the function with string parameters? I don’t want to use index it is too confusing
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
When you create the sub items, you have to set the Name property to be that of the column in which it resides.
The […] accessor looks up the Name field in the ListViewSubItem class.
Without that set, the [“Name”].text operation you’re carrying out will return a null pointer type error.
Or, to put it another way, the search by key does not search by column name.
It searches according to the value that you set in SubItem.Name when you create the subitem.