2012-02-02 15 views

答えて

3

Yoouはcustomedittypeを設定し、custom_elementcustom_value機能を提供する必要があります。ドキュメントからの例:

<script> 
function myelem (value, options) { 
    var el = document.createElement("input"); 
    el.type="text"; 
    el.value = value; 
    return el; 
} 

function myvalue(elem, operation, value) { 
    if(operation === 'get') { 
     return $(elem).find("input").val(); 
    } else if(operation === 'set') { 
     $('input',elem).val(value); 
    } 
} 

jQuery("#grid_id").jqGrid({ 
    colModel: [ 
     { 
     name:'price', 
     editable:true, 
     edittype:'custom', 
     editoptions:{ 
      custom_element: myelem, 
      custom_value:myvalue 
     } 
    }, 
    //... 
    ] 
}); 
</script> 

しかし、 jQuery UI Datepickerは、私は、次のコードを使用:

{ 
    name:'startTime', 
    label: 'Start time', 
    editable: true, 
    editoptions: { 
     dataInit: function (e) { 
      $(e).datetimepicker({}); 
     } 
    } 
} 

は詳細についてはCommon Editing Propertiesを参照してください。

+0

、私はPersianToolpackのjQueryを使用してコントロールを作成しますが、どうすれば使用できますか?私はasp.netを使用します。ありがとう – Pouya

関連する問題