FineUI 官方论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

本论坛已关闭(禁止注册、发帖和回复)
请移步 三石和他的朋友们

FineUI首页 WebForms - MVC & Core - JavaScript 常见问题 - QQ群 - 十周年征文活动

FineUI(开源版) 下载源代码 - 下载空项目 - 获取ExtJS - 文档 在线示例 - 版本更新 - 捐赠作者 - 教程

升级到 ASP.NET Core 3.1,快、快、快! 全新ASP.NET Core,比WebForms还简单! 欢迎加入【三石和他的朋友们】(基础版下载)

搜索
查看: 3231|回复: 0
打印 上一主题 下一主题

dropdownlist多选的问题

[复制链接]
跳转到指定楼层
楼主
发表于 2014-10-9 16:50:08 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
反馈BUG
程序版本: FineUI v4.1.4
浏览器: Chrome 
BUG截图:
BUG地址: -
前台代码:
<form id="form1" runat="server">
    <f:pagemanager id="ageManager1" runat="server" />
    <fropDownList ID="drop1" runat="server" Label="Label"  AutoPostBack="true" EnableMultiSelect="true" >
    </fropDownList>
   <fropDownList ID="ddlEJBCL" runat="server" AutoPostBack="true" EnableMultiSelect="true" Width="120px">
    </fropDownList>
    <f:Button ID="Button1" runat="server" Text="Button">
    </f:Button>
    </form>
后台代码:
protected void Page_Load(object sender, EventArgs e)
    {
        ddlEJBCL.Items.Clear();
        FineUI.ListItem list = new FineUI.ListItem();
        list.Text = "a";
        list.Value = "a";
        FineUI.ListItem list1 = new FineUI.ListItem();
        list1.Text = "b";
        list1.Value = "b";
        FineUI.ListItem list2 = new FineUI.ListItem();
        list2.Text = "c";
        list2.Value = "c";

        ddlEJBCL.Items.Add(list);
        ddlEJBCL.Items.Add(list1);
        ddlEJBCL.Items.Add(list2);

        string[] ss = new string[] { "a", "b", "c" };
        foreach (string s in ss)
        {
            ddlEJBCL.Items.FindByText(s).Selected = true;
        }
}

protected void Button1_Click(object sender, EventArgs e)
    {
        drop1.Items.Clear();
        FineUI.ListItem list = new FineUI.ListItem();
        list.Text = "a";
        list.Value = "a";
        FineUI.ListItem list1 = new FineUI.ListItem();
        list1.Text = "b";
        list1.Value = "b";
        FineUI.ListItem list2 = new FineUI.ListItem();
        list2.Text = "c";
        list2.Value = "c";

        drop1.Items.Add(list);
        drop1.Items.Add(list1);
        drop1.Items.Add(list2);

        string[] ss = new string[] { "a", "b", "c" };
        foreach (string s in ss)
        {
            drop1.Items.FindByText(s).Selected = true;
        }
    }

dropdownlist在Page_Load里能够实现多个选中,在Button1_Click里不能实现多个选中,只能显示一个选中








本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|FineUI 官方论坛 ( 皖ICP备2021006167号-1 )

GMT+8, 2024-9-28 21:17 , Processed in 0.048275 second(s), 20 queries , Gzip On.

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表