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

ListView Sort Problem

When I sort the third column in a listwiew using the Sort method it sorts
OK.

If I then clear the Items and try to refill the control the first item is
added OK

But when it tries to add the second item the sorter is called and tries to
compare the third columns

But the third column of the new item has not yet been added so I get an
exception.

I can work around it be setting the sort column to 0 when I clear but I
would rather turn the Sort off.

It didn't sort the first time I filled the view but it appears that once
Sort is called it always sorts.

Is there anyway of returning to the initial state?
Thanks

Nov 20 '05 #1
0 796

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

Similar topics

0
by: Mike Barrett | last post by:
I have a strange one here and I believe it is a bug. I googled it and saw others having a similar issue and nobody seems to have a fix. I will take another shot. I get this ERROR MESSAGE... ...
0
by: Mike Barrett | last post by:
I have a strange one here and I believe it is a bug. I googled it and saw others having a similar issue and nobody seems to have a fix. I will take another shot. I get this ERROR MESSAGE... ...
1
by: Richard | last post by:
Hi. I subclassed a ListView to give it the capability to sort by a column when the column header is clicked and it works fine. The problem is when the listview gets refreshed, all items are cleared...
7
by: BobAchgill | last post by:
I am trying to decide which of these controls to use to implement letting my user select a full row from MyList. The MyList has several columns which would be nice to sort by at run time. The...
0
by: Terry Brown | last post by:
I have a form which contains a listview item. The form is created to view data that is generated by interaction with a separate form. There are buttons on the form that change the data source...
6
by: Dave | last post by:
VB6 has a SorkKey property that you can setup on the ListView control to tell the ListView what column to use for sorting. In .NET there is a Sort() method and a SortOrder property that you can...
2
by: Lars Erik Nes | last post by:
Hi all. I have a problem. I get all my data from a dataset (not mssql) and in that dataset i have a table called "Activity". In this table i have a few date fields. When i display the dataset...
3
by: Vmrincon | last post by:
Hi everybody: Something weird is happening to me: I have a listview that I would like to sort in a special way. Because of that I have two different functions that sort it. I run the...
3
by: =?Utf-8?B?UHVjY2E=?= | last post by:
Hi, I'm using vs2005, .net 2 for C# windows application. One of my column on the Listview control has numericstring. Other columns are sorting correctly except this one. It seems to be sorting...
0
by: bharathreddy | last post by:
Hi All, I am using a listview control in my usercontrol so that it can be used in more than one form. This user control has one column extraw, so i want to make it invisible depending on the...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.