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