关于Anthem控件数据没有更新.....
在页面中我有一个DropDownList1和CheckBoxList.CheckBoxList里的数据是根据DropDownList1.SelectedValue的值来进行更新的但是现在CheckBoxList的里的数据没有重新刷新.
代码如下:
void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
DropDownList1.UpdateAfterCallBack = true;
int Matid=int.Parse(DropDownList1.SelectedValue);
Zowee.Kerp.Business.ContractManagement oContractManagement=new Zowee.Kerp.Business.ContractManagement();
chMatDetail.DataTextField="Caption";
chMatDetail.DataValueField="IdentifyCode";
chMatDetail.DataSource=oContractManagement.GetMatDetail(Matid);
chMatDetail.DataBind();
chMatDetail.UpdateAfterCallBack = true;
}
<anthem:DropDownList id="DropDownList1" runat="server" AutoCallBack="true" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged"
Width="160px"></anthem:DropDownList>
<anthem:CheckBoxList id="chMatDetail" runat="server" AutoCallBack="true" RepeatDirection="Horizontal"
RepeatColumns="6"></anthem:CheckBoxList>
我回调后也更新了页面-chMatDetail.UpdateAfterCallBack = true;
但是,CheckBoxList 里的数据没有反应,当我点一下确定按钮时,CheckBoxList 才刷新.
请问如何处理???
--------------------编程问答-------------------- AutoCallBack?应该是AutoPostBack吧?
chMatDetail.DataSource=oContractManagement.GetMatDetail(Matid);好像要放到chMatDetail.DataTextField="Caption";
的前面吧?
--------------------编程问答-------------------- 一样的效果啊...没用的.好象一定要提交一个服务器才被刷新 --------------------编程问答--------------------
两个都在服务器控件~不经过服务器怎么刷新?
补充:.NET技术 , ASP.NET