Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/30.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net ASPxListBox";选择全部";按钮_Asp.net_Listbox_Devexpress - Fatal编程技术网

Asp.net ASPxListBox";选择全部";按钮

Asp.net ASPxListBox";选择全部";按钮,asp.net,listbox,devexpress,Asp.net,Listbox,Devexpress,是否可以在列表框中选择所有按钮?有什么办法可以实施吗?谢谢 // Set - SelectionMode="Multiple" for your ListBox and then do protected void LinkButton1_Click1(object sender, EventArgs e) { foreach (ListItem li in ListBox1.Items) { li.Selected = true; } } 样本可从

是否可以在列表框中选择所有按钮?有什么办法可以实施吗?谢谢

// Set  - SelectionMode="Multiple" for your ListBox and then do

protected void LinkButton1_Click1(object sender, EventArgs e)
{
    foreach (ListItem li in ListBox1.Items)
    {
        li.Selected = true;
    }
}
样本可从以下网址获取:


您可以通过以下方式选择所有ASPxListBox项目:

<dx:ASPxListBox ID="lb" runat="server" ClientInstanceName="lbClient" SelectionMode="CheckColumn">
</dx:ASPxListBox>
服务器:

lbClient.SelectAll();
lb.SelectAll();