#region 医嘱内容省略显示
private void GridOrder_DataSourceChanged(object sender, EventArgs e)
{
foreach (DataGridViewRow row in GridOrder.Rows)
{
string Str = Convert.ToString(row.Cells["content"].Value);
if (Str.Length > 21)
{
row.Cells["content"].Value = Str.Substring(0, 21) + "..."; //截取20个显示,其他用“...”号代替
row.Cells["content"].ToolTipText = Str;//鼠标放上去显示全部信息
}
}
}
#endregion
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交