- Method 1: (load the content of the current page after modification)
// Set for the first time
$ ('# TelGrid'). datagrid ({
Url :'P_n_list.php? Act = getAjax_list & s_key = 400 phone
& Website = http://www.my400800.cn
',
Nowrap: false,
Striped: true,
Collapsible: true,
Pagination: true,
Rownumbers: true,
Pagination: true,
Toolbar :[{
Text: 'add ',
IconCls: 'icon-add ',
Handler: function (){
// $ ('# Btnsave'). linkbutton ('enable ');
// Alert ('add ')
AddRow ();
}
},'-',{
Text: 'modify'
,
Handler: function (){
UpdateRow ();
}
},'-',{
Text: 'delete ',
IconCls: 'icon-delete ',
Handler: function (){
GetSelections ();
}
},'-',{
Text: 'query ',
IconCls: 'icon-search'
,
Handler: function (){
$ ('# Searchw'). window ({
Title: 'set query condition ',
Width: 300,
Modal: true,
Shadow: false,
Closed: false,
Height: 200,
Close: function (){
Alert ('data ');
}
});
}
}]
});
$ ('# TelGrid'). datagrid ('reload ',{
S_key
: Phone number 800
});
Method 2:
$('#telGrid').datagrid({url:'http://www.my400800.cn', queryParams:{s_key:'400', website:'http://www.my400800.cn/LianXiWoMen.html' }});