如何在Listview控件中省略特定的扩展文件 [英] How to Omit Specific extension files in Listview control

查看:59
本文介绍了如何在Listview控件中省略特定的扩展文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好朋友,



我有一个场景,我必须让最终用户能够在treeview中选择一个文件夹并在文件夹上点击所有文件这里面的文件夹将显示在listview中,除了一些扩展名为.cab,.mp3等的特定文件类型。



我能够显示所有文件但无法显示省略特定的文件类型。



帮我这样做....



提前完成..

Hello friends,

I have a scenario that I have to give the end user the ability to select a folder in treeview and onclick on folder all of the files and folders inside this will be shown in listview except some specific file type with extension .cab, .mp3 etc..

I am able to show all files but unable to omit the specific file types.

Help me to do this....

Thanx in advance..

推荐答案

您好b $ b

我不知道你是如何从文件夹中读取文件列表的。

但我可以说,在将文件列表放入列表视图之前,您可以检查文件

扩展名。或者您可以使用System.IO.Directory.GetFiles的搜索模式
Hi
I don''t know how you are reading the file list from the folder.
But what I can say that before putting the file list in List view, you can check the file
extension. or you can use the search Pattern of System.IO.Directory.GetFiles


这篇关于如何在Listview控件中省略特定的扩展文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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