ListView按列排序 [英] ListView Sorting by Column

查看:83
本文介绍了ListView按列排序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用VB.NET


我有一个包含多列的ListView。


两列包含整数值,而剩下的包含字符串

值。


我很困惑如何根据用户的列标题对列进行排序

的功能已点击升序和

降序格式。


如果有人可以提供一些有用的代码,或建议如何这样可以

最好完成,非常感谢。


问候,


Owen

解决方案

这实际上非常困难,因为你需要创建自己的

排序类。


请查看此URL:

http://support.microsoft.com/default...;EN-US;Q319401


< WatchForW rapping()>


-

乐于助人,

- Tom Spink

(th**********@ntlworld.com)


与你的服务器一起下去

http://dotnetx.betasafe.com >>在修补


请回复新闻组,

所以所有人都可以受益

" Owen T. Soroke" <流********* @ hotmail.com>在消息中写道

新闻:a0 ******************************** @ 4ax.com ...

使用VB.NET

我有一个包含多列的ListView。

两列包含整数值,而剩下的包含字符串
值。

我很困惑如何根据用户在升序和降序格式中点击的列标题提供排序列的功能


如果有人能提供一些有用的代码,或建议如何最好地实现这一点,我们将不胜感激。

此致,
欧文



向你提出建议汤姆。我会尝试一下这个让你知道事情是怎么回事。


比VS6困难一点。


再次感谢,


Owen


2003年8月21日星期四17:38:45 + 0100,Tom Spink

< th ********** @ ntlworld.com>写道:

这实际上非常困难,因为你需要创建自己的
排序类。

请查看此网址:

http://support.microsoft.com/default...;EN-US;Q319401

< WatchForWrapping()>




Tom,

实际上很难,因为你需要创建你的
自己的排序类。
困难吗?或者你的意思是不难?


恕我直言,虽然你需要自己的排序课,但实际上很容易实现...... b $ b ...


对于文章的VB.NET版本:
http://support.microsoft.com/default...b;EN-US;319399


只是一个想法

Jay


" Tom Spink" <第********** @ ntlworld.com>在消息中写道

news:uk ************* @ tk2msftngp13.phx.gbl ...实际上很难,因为你需要创建
自己的排序类。

请查看此URL:

http://support.microsoft.com/default...;EN-US;Q319401
< WatchForWrapping()>

-
很乐意提供帮助,
- Tom Spink
(th ****** ****@ntlworld.com)

关闭你的服务器

http://dotnetx.betasafe.com >>在修补

请回复新闻组,
所以所有人都可以受益

Owen T. Soroke <流********* @ hotmail.com>在消息中写道
新闻:a0 ******************************** @ 4ax.com ... < blockquote class =post_quotes>使用VB.NET

我有一个包含多列的ListView。

两列包含整数值,而其余的包含字符串
价值。

我很困惑,我将如何提供基于用户点击升序和降序格式的列标题对列进行排序的功能。

如果有人能提供一些有用的代码,或建议如何最好地实现这一点,我们将不胜感激。

问候,
欧文




Using VB.NET

I have a ListView with several columns.

Two columns contain integer values, while the remaining contain string
values.

I am confused as to how I would provide functionality to sort columns
based on the column header the user has clicked in both Ascending and
Descending formats.

If anyone could offer some useful code, or suggestions as how this can
best be accomplished, it would be much appreciated.

Regards,

Owen

解决方案

It''s actually quite difficult, in the fact that you need to create your own
sorting class.

Please check out this URL:

http://support.microsoft.com/default...;EN-US;Q319401

<WatchForWrapping()>

--
Happy to help,
-- Tom Spink
(th**********@ntlworld.com)

"Go down with your server"

http://dotnetx.betasafe.com >> On The Mend

Please respond to the newsgroup,
so all can benefit
"Owen T. Soroke" <ow*********@hotmail.com> wrote in message
news:a0********************************@4ax.com...

Using VB.NET

I have a ListView with several columns.

Two columns contain integer values, while the remaining contain string
values.

I am confused as to how I would provide functionality to sort columns
based on the column header the user has clicked in both Ascending and
Descending formats.

If anyone could offer some useful code, or suggestions as how this can
best be accomplished, it would be much appreciated.

Regards,

Owen



Thnak you for your suggestions Tom. I will try this out and let you
know how things turned out.

A little more difficult than VS6.

Thanks again,

Owen

On Thu, 21 Aug 2003 17:38:45 +0100, "Tom Spink"
<th**********@ntlworld.com> wrote:

It''s actually quite difficult, in the fact that you need to create your own
sorting class.

Please check out this URL:

http://support.microsoft.com/default...;EN-US;Q319401

<WatchForWrapping()>




Tom,

It''s actually quite difficult, in the fact that you need to create your own sorting class. Difficult? Or did you mean ''not difficult''?

IMHO although you need your own sorting class its actually very easy to
do...

For the VB.NET version of the article:
http://support.microsoft.com/default...b;EN-US;319399

Just a thought
Jay

"Tom Spink" <th**********@ntlworld.com> wrote in message
news:uk*************@tk2msftngp13.phx.gbl... It''s actually quite difficult, in the fact that you need to create your own sorting class.

Please check out this URL:

http://support.microsoft.com/default...;EN-US;Q319401

<WatchForWrapping()>

--
Happy to help,
-- Tom Spink
(th**********@ntlworld.com)

"Go down with your server"

http://dotnetx.betasafe.com >> On The Mend

Please respond to the newsgroup,
so all can benefit
"Owen T. Soroke" <ow*********@hotmail.com> wrote in message
news:a0********************************@4ax.com...

Using VB.NET

I have a ListView with several columns.

Two columns contain integer values, while the remaining contain string
values.

I am confused as to how I would provide functionality to sort columns
based on the column header the user has clicked in both Ascending and
Descending formats.

If anyone could offer some useful code, or suggestions as how this can
best be accomplished, it would be much appreciated.

Regards,

Owen




这篇关于ListView按列排序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆