解决方案 »

  1.   

     $(function(){
             $("#datagrid_pro").datagrid({
                  columns: [[ 
                        { field: 'orderid', title: '订单ID', width: '80' ,
                              editor: {
                                     type: 'combobox',
                                     options: {
                                             //这里应该怎么绑定数据 如 url: ../ja/combobox.ashx
                                            url:工程路径+请求路径(如工程名为easyui,数据请求路径为data.ashx,则为easui/data.ashx)
                                      }
                               }
                        }
                     ]] 
           }) ;
       }) 
      

  2.   

     经过一早上的奋斗终于解决数据绑定的问题 
    原因出在请求的ashx 返回的数据,我换成json  var Address = [{ "value": "1", "text": "CHINA" }, { "value": "2", "text": "USA" }, { "value": "3", "text": "Koren" }]; 之后,在editor: {
                                     type: 'combobox',
                                     options: {
                                             //这里应该怎么绑定数据 如 url: ../ja/combobox.ashx
                                           url: ....,
                                           valueField:"value",
                                           textField: "text"
                                      }
                               }不过又出现了一个问题,发现点击下拉框的时候 不管选择哪个,最后都会显示选择的是第一个数据的  这是为什么呢?