JQuery Easyui--datagrid Internal Embedding dropdown

Source: Internet
Author: User

1. Easy UI Reference:

Easyui website Help URL: http://jeasyui.com/

Find the DataGrid in which you can see the specific help.

2. jquery Easyui Development Experience : Recently developed a project with the jquery Easyui framework, found that the framework is also good, not very complex development, basic can meet the requirements, mainly free of charge, help document is also perfect, is currently unable to find the source code, Low version of the 1.2.4 I have found the source code, sometimes need to modify the source word a bit limited, there is the use of Help, some properties or methods provide is not very full, but such as layout inherited panel, a lot of properties and methods need to go to the panel to find.

3.Datagrid Add dropdown feature Introduction

Today the main talk about the Easyui DataGrid control, actually combined with the script that you developed, currently this control can not achieve the effect.

The Easyui DataGrid itself provides features such as: expand/shrink, multi-line checkbox selection

Write your own JS new features: Red delete icon, dropdown

3.1 Find the element you want to add dropdown to

var cell = $ (' tr[datagrid-row-index= ' + index + '] '). Children (' [field=location_detail] ');

Location_detail is the column name, the index parameter is the line number

3.2 Specific added code

<span style= "FONT-SIZE:18PX;" >var tr = null;if (isshelf) {cell.empty (); var table = $ (' <table cellspacing=0 cellpadding=0></table> '); Cell.append (table), tr = $ (' <tr></tr> '); Table.append (tr);} ELSE{TR = cell.children (' table '). Find (' tr ');} var td = $ ("<td><div id= '" + CbID + "'/></td>"); Tr.append (TD); $ (' # ' + CbID). ComboBox ({Panelmaxheight:2 50,valuefield: ' Code ', TextField: ' Description ', width:85,data:json,onselect:function (record) {var room_id = Cbid.split ('_') [0];var level = parseint (Cbid.split ('_') [1]), var nextlevel = level + 1;var RowIndex = parseint (Cbid.split (  ' _ ') [2]; var Childjson = Getstoragelist (_leveljson, room_id, nextlevel); if (Childjson.length > 0) {var NextID = room_id + ' _ ' + nextlevel.tostring () + ' _ ' + rowindex.tostring (); Addcombobox (cell, Childjson, NextID, false);} The ComboBox change if Update Storage_name}});</span>


JQuery Easyui--datagrid Internal embedding dropdown

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.