Embed Combobox and easyuidatagrid in the DataGrid of EasyUI

Source: Internet
Author: User

Embed Combobox and easyuidatagrid in the DataGrid of EasyUI



When working on the project, you need to embed Combobox in the DataGrid of EasyUI. After several days, with the help of everyone, you can finally see how it looks like:


The core code is as follows:

<Html> 


In the Combobox editor, the data source url: '/News/returnisenableddata' corresponds to the method in the corresponding Controller (in fact, it is a very simple json string in the background ):

Public string ReturnIsShowData () {string strJson = "[{\" id \ ": \" yes \ ", \" text \ ": \" yes \"}, {\ "id \": \ "no \", \ "text \": \ "no \"}] "; return strJson ;}

When the value in Combobox is selected, you only need to write the operation to be executed in the onAfterEdit (index, row, changes) function. index is the row number to be edited. The default value starts from 0; row is the entire row where the edited cell is located. row. the column name can obtain the data of this row, such as row. isShow can obtain the data in the IsShow column of the row where the cell to be edited is located.


(This article is based on Asp.net MVC)


Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

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.