首页 新闻 会员 周边

筛选后重新绑定ASPxGridView1绑定的数据没有显示

0
悬赏园豆:30 [已关闭问题] 关闭于 2016-05-03 22:09

页面刚加载的时候绑定了ASPxGridView1,按条件筛选后重新绑定ASPxGridView1绑定的数据没有显示   

 

这是我的代码

DataTable dt = new DataTable();
dt=ALLS.RepaymentPlanQueryHe(StartDate, closingDay).Tables[0];
this.ASPxGridView1.DataSource = dt;
this.ASPxGridView1.DataBind();            

 

请问是什么问题             

ouyangdu的主页 ouyangdu | 初学一级 | 园豆:6
提问于:2015-09-20 17:46
< >
分享
所有回答(5)
0

建议调试一下,是否执行了这段代码

jello chen | 园豆:7306 (大侠五级) | 2015-09-20 19:09

执行了的,而且是有数据的

支持(0) 反对(0) ouyangdu | 园豆:6 (初学一级) | 2015-09-20 20:10
0

Tables[0].DefaultView

空明流光 | 园豆:106 (初学一级) | 2015-09-20 20:20

这是什么

支持(0) 反对(0) ouyangdu | 园豆:6 (初学一级) | 2015-09-20 21:13

@ouyangdu: dt.DefaultView

支持(0) 反对(0) 空明流光 | 园豆:106 (初学一级) | 2015-09-21 02:43
0

1.要么你的事件没写对,导致没有请求,没有刷新页面,

2.要么你的控件名字不对!check  it! Man

大楚打码人 | 园豆:4313 (老鸟四级) | 2015-09-20 22:01

页面刷新了

支持(0) 反对(0) ouyangdu | 园豆:6 (初学一级) | 2015-09-21 08:57
0

this.ASPxGridView1.DataSource=null;绑定前先清空下,不然会有很多影响的,这是常出现的问题

稳稳的河 | 园豆:4216 (老鸟四级) | 2015-09-21 09:17
0

https://www.devexpress.com/Support/Center/Question/Details/Q357745

[JScript]

var prm = Sys.WebForms.PageRequestManager.getInstance(); prm.add_endRequest(prm_EndRequest); function prm_EndRequest(sender, args) { grid.Refresh(); }

 

When the ASPxGridView is bound via callbacks, you should:
1. disable its ViewState;
2. bind the ASPxGridView in the Page_Init event handler (the state of the page should be restored correctly);

 

JackWang-CUMT | 园豆:2866 (老鸟四级) | 2015-09-21 11:51
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册