Embed a ComboBox in the Easyui DataGrid

Source: Internet
Author: User



In doing the project, you need to embed the ComboBox in Easyui's DataGrid for several days, and with the help of everyone, we finally see its ranks:


The core code is as follows:


The data source URL for the editor in the ComboBox type: '/news/returnisenableddata ' corresponds to the method in the corresponding controller (it is actually a very simple JSON string that is spelled in the background):

public string Returnisshowdata ()        {            string strjson = "[{\" "id\": \ "yes\", \ "text\": \ "Yes \"},{\ "id\": \ "no\", \ "text \ ": \" no \ "}]";                      return Strjson;        }

when you select a value in a ComboBox, simply write the action you want to perform in the Onafteredit (index, row, changes) function, index is the line number of the edit, and the default starts at 0; row is the entire row of the cell being edited. Row. Column names can get data for this column of this row, such as row.isshow can get data for the Isshow column of the row that the cell is being edited in.


(This article is based on ASP. NET MVC)


Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Embed a ComboBox in the Easyui DataGrid

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.