EasyUI Forum
September 13, 2025, 09:02:04 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: [1]
1  General Category / EasyUI for jQuery / combobox load data from mvc on: March 16, 2015, 08:59:28 AM
Hi,

Actually I did the same as you have in the dynamicdata.html (in demo). it means i have a button to load the data to the combo. in the reload method i call an MVC JsonResult. when clicking the button, that mvc action is called, and it returns back the json string.
something is loaded the combo, because when i open the list there are many items, and i can find also in the html source that it is loaded with empty scrings
this is the view:
Code:
    <div style="margin: 20px 0;">
      <a href="javascript:void(0)" class="easyui-linkbutton" onclick="$('#language').combobox('reload', '/DataSetup/GetValuSetImports')">LoadData</a>
    </div>

    <input class="easyui-combobox" id="language" name="language"
      data-options="valueField:'ImportTimeStamp',textField:'RowCnt'">

this is the json result:
Code:
"[{\"ImportTimeStamp\":\"hello\",\"RowCnt\":1232},{\"ImportTimeStamp\":\"world\",\"RowCnt\":1000}]"

thanks
Ivan
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!