从C#listview中选择文本 [英] Selecting the text from a C# listview

查看:123
本文介绍了从C#listview中选择文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我需要帮助才能实现以下功能:



我有一个包含学生课程的列表视图,一列包含条形码ID,一列持有主题代码,一个持有课程作业标题,一个持有截止日期。

我想要一个按钮点击事件,在那里通过它检查所选行(NB:我已激活完整行选择),然后在该特定行的每一列中接收单独的字符串,以用于程序上的某些其他目的。

请欣赏快速简便的方法,谢谢

Hi,
I need help in implementing this below:

I have a list view containing students courseworks, one column holding the barcode IDs, one column holding subject code, one holding the coursework title and one holding the due dates.
I want to have a button click event where by it checks the selected row (NB: i activated full row select), and then takes in the separate strings in each column on that specific row for some other purposes on the program.
Would appreciate a fast and easy way please, thanks

推荐答案

使用 ListView.SelectedItems属性 MSDN会轻轻提供您需要的示例代码 [ ^ ]。


这篇关于从C#listview中选择文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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