Format ComboBox Items
This tutorial will show how to create a simple combobox which displays image items in the drop down panel. You can use the formatter function on combobox to tell it how to format each of its items.
<input id="cc" type="text">
$('#cc').combobox({
url:'combobox_data.json',
valueField:'id',
textField:'text',
formatter:function(row){
return '<img class="item-img" src="'+row.icon+'"/><div class="item-text">'+row.text+'</div>';
}
});
As you can see above, the formatter function takes one parameter named 'row' and return the formatted item value.
http://jquery-easyui.wikidot.com/tutorial:form4
分享到:
相关推荐
这篇文章中我们重点需要实现的是(3)、(4)两项功能,下面我们来介绍具体实现的方法。 第一步,实现ImageComboBoxItem类。 要实现显示图标,当然要给每个项添加与图标相关的信息了,ImageComboBoxItem类应该包括...
label1.Content = string.Format("Windows将在 {0} 关机", TimerClass.GetTimeString1(second)); if (second !cbo1.IsEnabled) { ShutDown(); } } int second = 0; private void Button_Click(object ...
If ComboBox1.Items.Item(ComboBox1.SelectedIndex) = "指定日期" Then tempStr = DateTimePicker1.Value.ToShortDateString Else tempStr = ComboBox1.SelectedItem End If tempStr &= "," & CStr(Math.Round...
Table of Contents | Index Programming Excel with VBA and .NET Preface Part I: Learning VBA Chapter 1.... Section 1.1.... Section 1.2.... Section 1.3.... Section 1.4.... Section 1.5.... Section 1.6....
Just call CBCGPRibbonComboBox::EnableCalculator method to assign a calculator to the ribbon combobox. Override a new 'OnCalculatorUserCommand' method to implement your calculator commands. Please ...
1.2.6 Round方法——将小数值舍入到指定的精度 28 1.3 流程控制语句 29 1.3.1 break语句——跳出循环 29 1.3.2 case语句——比较表达式以确定结果 30 1.3.3 continue语句——继续执行下一个循环 31 1.3.4 do…while...
<END><br>46,FldrView.zip The Folderview ActiveX Control mimics the behaviour of the Windows Explorer Treeview showing the tree structure of the files and folders and other items in the shell's ...
1、程序功能和使用环境介绍 2、程序操作方法介绍 3、登录信息文件RadminM.txt介绍 4、登录信息文件RadminM.txt的转换和编制 5、v3.0版新增解锁远程桌面功能 6、相关配置和多种语言支持介绍 ...
1、程序功能和使用环境介绍 2、程序操作方法介绍 3、登录信息文件RadminM.txt介绍 4、登录信息文件RadminM.txt的转换和编制 5、v3.0版新增解锁 远程桌面功能 6、相关配置和多种语言支持介绍 ...
Its contains the methods and what you need to do to move individual items or the whole contents of one listbox to another and vice-versa.<END><br>58,supress.zip Supress Spaces in a TextBox<END><br...