我要用模板列我就不问了,呵呵,谢谢

解决方案 »

  1.   

    搞定了
    private void dg_user_ItemCreated(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
    {
    if (e.Item.ItemType == ListItemType.EditItem)
    {

    for(int i=0;i< e.Item.Cells.Count;i++){
    foreach(Control ct in e.Item.Cells[i].Controls){
    if(ct is System.Web.UI.WebControls.TextBox){

    ((TextBox)ct).Width=Unit.Pixel(200);
    ((TextBox)ct).BackColor=Color.Blue;
    }

    }
    }

    }

    }
    我看又要自己给自己分了,哈哈