![]() |
#2
qingshuiliu2010-09-01 19:51
|
// 实现物料单行梆定的处理事件
protected void gvMaterial_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
if (((YCC.Models.Material)e.Row.DataItem).MaterialID == null || ((YCC.Models.Material)e.Row.DataItem).MaterialID == "")
{
e.Row.Cells[0].Text = "";
e.Row.Cells[1].Text = "";
e.Row.Cells[2].Text = "";
e.Row.Cells[3].Text = "";
e.Row.Cells[4].Text = "";
e.Row.Cells[5].Enabled = false;
}
else
{
YCC.Models.Material item = (YCC.Models.Material)e.Row.DataItem;
e.Row.Cells[4].Text = bllMaterial.GetMaterialType(item.MTypeID).MTypeName;
}
}
}
只有本站会员才能查看附件,请 登录
图一只有本站会员才能查看附件,请 登录
图二图一是预先得到的结果,图二是点击“选择”项的结果,对于类别名称那一列的显示方法在上面用橘色处调用。
为什么我点击“选择”后,类别名称会丢失?
请高手指教。。。