可以在前台做成模板列
也可以在DataTable加上一列显示*再绑定

解决方案 »

  1.   

    把列转成模板列,放了label。设置字符。1楼正解
      

  2.   

    GridView1.Rows[i].Cells[2].Text = ***********
      

  3.   

        protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            string strmima = "";
            for (int i = 0; i < e.Row.Cells[0].Text.ToString().Length; i++)
            {
                strmima += "*";
            }
            e.Row.Cells[0].Text = strmima;
        }
      

  4.   

    1.模板列加label
    2.直接写死
    3.就楼上的方法
     所有row.cells[某列].text=string型变量或写死的字符串
      

  5.   

    再或者在sql语句中直接把密码对应的列换成*也可以