easyui form load 数据表单有下拉框
(function () {
$('#text1').combobox({
url: 'http://localhost:5463/test/getComboJson'
})
$('#text2').combobox({
url: 'http://localhost:5463/test/getComboJson'
})
$('#text3').combobox({
url: 'http://localhost:5463/test/getComboJson'
})
$('#text4').combobox({
url: 'http://localhost:5463/test/getComboJson'
})
$('#text5').combotree({
url: 'http://localhost:5463/test/getTreeJson'
})
Public.post("http://localhost:5463/test/getFristOne", {id: }, function (data) {
$('#form1').form('load', data);
})
})
我让下拉框延迟加载看form会不会加载不上??
public ActionResult getFristOne() {
Dictionary<string, object> dic = new Dictionary<string, object>();
dic.Add("text1", "");
dic.Add("text2", "");
dic.Add("text3", "");
dic.Add("text4", "");
dic.Add("text5", "");
//Thread.Sleep(2000);//线程挂起1000毫秒
return Json(dic, JsonRequestBehavior.AllowGet);
}
public ActionResult getTreeJson() {
IList<Dictionary<string, object>> List = new List<Dictionary<string, object>>();
for (int i = ; i < ; i++)
{
Dictionary<string, object> dic = new Dictionary<string, object>();
dic.Add("id", i.ToString());
dic.Add("text", "项目"+i);
IList<Dictionary<string, string>> children = new List<Dictionary<string, string>>();
dic.Add("children", new ArrayList());
List.Add(dic);
}
Thread.Sleep();//线程挂起1000毫秒
return Json(List, JsonRequestBehavior.AllowGet);
}
public ActionResult getComboJson()
{
IList<Dictionary<string, object>> List = new List<Dictionary<string, object>>();
for (int i = ; i < ; i++)
{
Dictionary<string, object> dic = new Dictionary<string, object>();
dic.Add("value", i.ToString());
dic.Add("text", "项目" + i);
List.Add(dic);
}
Thread.Sleep();//线程挂起1000毫秒
return Json(List, JsonRequestBehavior.AllowGet);
}
结果加载上了。
阅读easyui的源代码发现,这个它是根据name来反找了一下组件的实例然后调用了setValue方法

easyui form load 数据表单有下拉框的更多相关文章
- 雷林鹏分享:jQuery EasyUI 表单 - 格式化下拉框
jQuery EasyUI 表单 - 格式化下拉框 本教程向您展示如何创建一个简单的下拉框(Combobox),让它在下拉框中显示图片项.您可以在下拉框(combobox)上使用 formatter ...
- form表单传递下拉框的Value和Text值,不适用Jquery传递
同时获取下拉框的Value和Text值的解决办法:添加一个<input type="text" >文本框,用户选中一项后就将该项的value值给他 然后接受页面获取该文 ...
- Django forms表单 select下拉框的传值
今儿继续做项目,学习了Django的forms生成前端的代码. forms.py class SignupForm(forms.Form): username = forms.CharField(va ...
- iview表单验证下拉框不通过问题
iview表单验证的步骤: 第一步:给 Form 设置属性 rules :rules 第二步:同时给需要验证的每个 FormItem 设置属性 prop 指向对应字段即可 prop=”“ 第三步:注意 ...
- php简易表单及下拉框动态渲染
<?php//1.连接数据库$link = mysqli_connect('127.0.0.1','root','root','1906');//2.设置字符集mysqli_set_charse ...
- 雷林鹏分享:jQuery EasyUI 表单 - 过滤下拉数据网格
jQuery EasyUI 表单 - 过滤下拉数据网格 下拉数据网格(Combogrid)组件和下拉框(Combobox)组件的共同点是,除了都具有下拉面板以外,它们都是基于数据网格(Datagrid ...
- 大型情感剧集Selenium:4_老中医教你(单/多/下拉框)选项定位 #华为云·寻找黑马程序员#
今天讲什么 讲什么标题说了,讲selenium的单选.多选.下拉框选项定位.但其实这东西,没什么太多说的,又比较枯燥,那该怎么让这一集selenium的课程变得有趣呢?有请老中医,哈哈- 怎么样,这个 ...
- easyui源码翻译1.32--Combo(自定义下拉框)
前言 扩展自$.fn.validatebox.defaults.使用$.fn.combo.defaults重写默认值对象.下载该插件翻译源码 自定义下拉框显示一个可编辑的文本框和下拉面板在html页面 ...
- layui-table-column-select(layui数据表格可搜索下拉框select)
layuiTableColumnSelect 在layui table的基础上对表格列进行扩展:点击单元格显示可搜索下拉列表. 码云地址:https://gitee.com/yangqianlong9 ...
随机推荐
- LPC1800 and LPC4300 MCUs
LPC1800 Series microcontrollers At 180 MHz, LPC1800 Series microcontrollers combine the industry's f ...
- showplan_text查询计划查询 sql执行顺序 时间 IO
http://www.cnblogs.com/happyday56/archive/2009/09/10/1564144.html set showplan_text ongoselect exp ...
- NSNotification的使用(对观察者模式最通俗、易懂的讲解)
这是一个观察者模式. 首先在你需要监听的类中加入观察者: - (void)addObserver:(id)observer selector:(SEL)aSelector name:(NSString ...
- ArcEngine二次开发错误编码对照表(转)
阅读数:3323 每当我们在进行AE开发,出现错误时经常会出现错误代码,但是我们并不知道它到底代表什么意思,这里的而错误编码我们可以对照着找到我们需要的时候常详细信息(问题是,经常还是会出现没有错误编 ...
- 【python】python编码方式,chardet编码识别库
环境: python3.6 需求: 针对于打开一个文件,可以读取到文本的编码方式,根据默认的文件编码方式来获取文件,就不会出现乱码. 针对这种需求,python中有这个方式可以很好的解决: 解决策略: ...
- VisualStudio: Vistual Studio XML 智能提示(转载)
原文地址:http://blog.csdn.net/hispring/article/details/5332312. 开发中经常遇到要和各种各样的 XML 打交道,编辑 XML 文件时最头痛的便是要 ...
- 现场故障-数据量超出plsql developer结果集导致应用程序无数据现象
情景重现: 维护人员想要用plsql developer工具查看一年前某表的数据,表中数据约30W行,因为此时无业务,维护人员关闭了应用程序.查询时选择了将所有数据所有列出,结果在显示到3W多行时,弹 ...
- sql --- where concat
// where cancat 函数 SELECT * from users WHERE email != CONCAT(username, '', '@huan1234qiu.com');
- java数字转换成文字方法
public class IntToSmallChineseNumber { public static String ToCH(int intInput) { String si = String. ...
- Java并发编程的艺术(五)——中断
什么是中断? 在Java中没有办法立即停止一条线程,然而停止线程却显得尤为重要,如取消一个耗时操作.因此,Java提供了一种用于停止线程的机制——中断. 中断只是一种协作机制,Java没有给中断增加任 ...