FineUI 官方论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

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

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

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

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

搜索
查看: 3698|回复: 5

f:DropDownList的树状菜单更新问题

[复制链接]
发表于 2018-7-10 18:24:56 | 显示全部楼层 |阅读模式
求教:fropDownList的树状菜单更新问题——textbox中输入新建菜单名称,下拉列表控件实现数据再绑定,总是会报错问题出在ext-fineui.js文件中的parentIndex和littlebrother两处,代码如下:
前台:
<fropDownList ID="ddlBox" runat="server" EnableSimulateTree="true"></fropDownList>
        <fabel ID="Label2" runat="server" LabelAlign="Right" LabelWidth="130px" Hidden="false"></fabel>
        <f:TextBox runat="server" ID="TextBox1" Label="(自动回发)" EmptyText="请选择" AutoPostBack="true" OnTextChanged="TextBox1_TextChanged"></f:TextBox>
        <f:Button ID="Button2" runat="server" Text="添加单位" OnClick="Button2_Click"></f:Button>
        <br />
        <fabel runat="server" ID="Label1"></fabel>
后台:
……
protected void Button2_Click(object sender, EventArgs e)
        {
            if ((ddlBox.SelectedItem != null) && (TextBox1.Text != null))
            {
                ParentID = ddlBox.SelectedItem.Value;
                departmentName = ddlBox.SelectedItem.Text;
                this.Label2.Text = String.Format("选中项:{0}(值:{1})", departmentName, ParentID);
                Insert_One(ParentID, Label.Text);
            }
            else
            {
                this.Label2.Text = "无选中项";
            }
            //ddlBox.Items.Clear();
            //Response.Redirect("Only_for_Test.aspx");
            Bind_database();
        }

        protected void TextBox1_TextChanged(object sender, EventArgs e)
        {
            Label1.Text = TextBox1.Text;
        }
发表于 2018-7-11 09:22:22 | 显示全部楼层
Insert_One方法是做什么的?
 楼主| 发表于 2018-7-11 09:28:50 | 显示全部楼层
这是数据库插入一条新增数据的函数,insert  into  表名称 where ……,主要插入的是上级单位和本级单位名称。
 楼主| 发表于 2018-7-11 09:31:33 | 显示全部楼层
报错地方在ext-fineui.js文件中第5486行if (parent.littlebrother) {
 楼主| 发表于 2018-7-11 09:34:03 | 显示全部楼层
表示看不懂js 代码
 楼主| 发表于 2018-7-13 06:23:41 | 显示全部楼层
搞定了,是我之前的数据处理有问题
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

GMT+8, 2024-3-28 22:12 , Processed in 0.047135 second(s), 18 queries , Gzip On.

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

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