前台:
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false" OnRowDataBound="GridView1_RowDataBound">
         <Columns>
           <asp:BoundField DataField="id" HeaderText="id"/>
          <asp:TemplateField>
            <ItemTemplate>
               <asp:CheckBox ID="checkbox1" runat="server" ToolTip='<%#Eval("id") %>'>
             </asp:CheckBox>
            </ItemTemplate>
          </asp:TemplateField>后台:
 protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
           
            BindGridView();
         }
    }
 void BindGridView()
    {
        this.GridView1.DataSource = GetTable();
        this.GridView1.DataBind();
    }
    DataTable GetTable()
    {
        DataTable dt = new DataTable();
        dt.Columns.Add("id", typeof(string));
        string[] str = new string[20];
        for (int i = 0; i < str.Length; i++)
        {
            str[i] = i.ToString();
        }
        for (int j = 0; j < str.Length; j++)
        {
            DataRow row = dt.NewRow();
            row["id"] = str[j];
            dt.Rows.Add(row);
        }
        return dt;
    }
 protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        CheckBox cb = e.Row.FindControl("checkbox1") as CheckBox;
        if (cb != null)
        {
            if (cb.ToolTip == "1")
            {
                cb.Checked = true;
            }
        }
    }