DataSet ds=s.GetGrade();string title=ds.Tables[0].Rows[0]["Field1"].ToString();if(title.Length>10){ string t=title.Substring(0,10);//得到要显示的标题 ds.Tables[0].Rows[0]["Field1"] = t; } grade.DataSource=ds.Tables[0].DefaultView;grade.DataBind(); 相关文章: 2021-07-26 2022-02-05 2022-12-23 2022-12-23 2021-07-26