EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
May 02, 2024, 04:42:04 PM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
EasyUI Forum
>
General Category
>
General Discussion
>
Combobox in edatagrid show id instead of description
Pages: [
1
]
« previous
next »
Print
Author
Topic: Combobox in edatagrid show id instead of description (Read 4789 times)
markalves
Newbie
Posts: 15
Combobox in edatagrid show id instead of description
«
on:
November 28, 2017, 08:31:37 AM »
Hi to all,
I have an edatagrid with a combobox I would like to show the description instead of index when I show the datagrid:
i.e.=
Table products is this:
id =1 description:'apple'
When I edit all ok combobox is displayed correctly but after confirmation the datagrid show
the id (1): How I can show 'apple' instead ?
this is the row code:
<th field="id" width="30" editor="{type:'combobox', options:{mode:'remote',valueField:'id',textField:'description',url:'combofruit.php',required:true}}">Frutta</th>
Logged
stworthy
Administrator
Hero Member
Posts: 3581
Re: Combobox in edatagrid show id instead of description
«
Reply #1 on:
November 29, 2017, 05:06:15 PM »
You should define a 'formatter' function to display the description for the datagrid. When end the editing, retrieve the description from the combobox and update to the editing row. For more information please look at this example
https://www.jeasyui.com/demo/main/index.php?plugin=DataGrid&theme=material&dir=ltr&pitem=Row%20Editing%20in%20DataGrid&sort=
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News
=> General Discussion
=> EasyUI for jQuery
=> EasyUI for Angular
=> EasyUI for Vue
=> EasyUI for React
=> Bug Report
Loading...