1
我已經使用了kendoui網格;KendoUI:獲取按鈕上的ID點擊PHP
<script>
$(function(){
$("#grid").kendoGrid({
dataSource:{
transport: {
read: "<?php echo base_url() ?>index.php/user_management/manage_users/list_view/"
},
schema:{
data: "data"
}
},
columns: [
{
field: "UserID",
hidden:true
},
{
field: "Username",
title:"Username"
},
{ field: "FirstName",
title:"First Name"
},
{field:"MiddleNames"},
{field:"LastName"},
{field:"City"},
{field:"Email"},
{field:"Actions"},
{command: { text: "View", click: showDetails }, title: " ", width: "140px"}
]
});
});
function showDetails(e) {
e.preventDefault();
//i want to get the id of the clicked row and pass that id to the next(redirected) page;
}
</script>
我如何獲取當前點擊的行ID即UserId
列值和ID(重定向)傳遞到下一個頁面?
我如何獲得UserId字段值? – 2013-03-22 15:07:43
看到undefined – 2013-03-22 15:09:21
var grid = $(「#grid」)。data(「kendoGrid」); var da = e.data.valueOf(「FirstName」); alert(da); 但只獲取對象對象,但我想要的值 – 2013-03-22 15:13:10