本文介绍了Listview项上下移动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有列表视图项,它包含约10个项,我有2个按钮,例如上下.我们假设选择了listview的第一项,当我单击向下按钮时,它将转到第二个位置,而当我单击向上按钮时,它将移至上侧.
这样,在单击按钮的同时文件可以上下移动.

将Windows应用程序与c#代码一起使用.

问候
Vasanth

I have list view items, it contains some 10 items, I have 2 buttons like up and down. We assuming the listview first item is selected, when i click the down button it will goes to second position, same time when i click the up button it will moves to upside.
Like that way the files are moves up and down while click the button.

Using Windows Application with c# code.

Regards
Vasanth

推荐答案

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ListBox ID="uxListBox1" runat="server" SelectionMode="multiple" />
        <asp:Button id="uxRightBtn" runat="server" OnClick="MoveRight" Text=" > " />
        <asp:Button id="uxLeftBtn" runat="server" OnClick="MoveLeft" Text=" < " />
        <asp:ListBox ID="uxListBox2" runat="server" SelectionMode="multiple" />
    </div>
    </form>
</body>
</html>


这篇关于Listview项上下移动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-22 19:59