如何获取listview复选框选中的项目inwm5 [英] how to get listview checkbox checked items inwm5

查看:80
本文介绍了如何获取listview复选框选中的项目inwm5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友,


我有一个listview里面的listview我有复选框.

然后,我在列表视图中选择多个复选框,然后单击要在文本框中显示的按钮.


我将数据绑定到列表视图中,好了

我只需要在选择复选框时选择要在文本框中显示的复选框项

Windows窗体可以,但在Windows移动窗体中没有CheckedListViewItemCollection

在Windows窗体中可以正常显示,但在Windows Mobile中则不会出现.

当我像ListView.chec打字时...它不在Windows Mobile窗体中

wt在这里是有问题的,没有能力,否则我必须添加dll之类的任何东西.


ListView.CheckedListViewItemCollectioncheckedItems = ListView1.CheckedItems;
我该怎么办.是否有其他解决方法..

Hi Friends,


I have one listview inside listview i have check boxes.

Then i select multiple checkboxes in listview and click button i want to display in textbox.


I bind data in listview thats ok

just i need when i select checkboxes that selected checkbox items i want to display in textbox

windows forms ok but in windows mobile forms there is no CheckedListViewItemCollection

in windows forms ok its appear but in windows mobile its not appear.

when i typ like ListView.chec...its not came in windows mobile forms

wt is proble here there is no capability for that otherwise i have to add any thing like dlls .


ListView.CheckedListViewItemCollection checkedItems = ListView1.CheckedItems;
what i have to do.is there any other way to resolve this..

推荐答案

<pre lang="msil">
Private Sub lsvBarang_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles lsvBarang.SelectedIndexChanged
        Try
            Dim cari As Integer
            cari = lsvBarang.FocusedItem.Index
            txtCari.Text = (lsvBarang.Items(cari).SubItems(1).Text)
            DataIDM = (lsvBarang.Items(cari).SubItems(1).Text)
            DataNama = (lsvBarang.Items(cari).SubItems(3).Text)
            DataTipe = (lsvBarang.Items(cari).SubItems(7).Text)
        Catch ex As Exception
        End Try
    End Sub






这篇关于如何获取listview复选框选中的项目inwm5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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