
























First ,make sure that you had added BindData code in InitializeDataSource(object sender, DataSourceEventArgs e) Event .
Sample code:
protected void WebGrid1_InitializeDataSource(object sender, DataSourceEventArgs e)
{
DataTable dt=method.GetDataTable();
e.DataSource = dt;
}
And then you can invoke Refresh() funtion with javascript .
sample code:
function Refresh()
{
var grid = ISGetObject("WebGrid1");
grid.Refresh();
}
BTW,You also can Perform refresh on the particular table only, without refreshing the whole tables (root table and child tables).
sample code:
function refreshChild() {
var grid = ISGetObject("WebGrid1");
grid.Tables[tablename].Refresh();
}
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。