protected void gvDataBind() { DataTable dt = MessageInfo.MsgGv(); DataView view = dt.DefaultView; string sort = (string)ViewState["SortExpression"] + " " + (string)ViewState["SortDir"]; view.Sort = sort; if (dt.Rows.Count == 0) { dt.Rows.Add(dt.NewRow()); UI.BindCtrl(dt.DefaultView, gvMsg, AspNetPager1); gvMsg.Rows[0].Visible = false; } else { UI.BindCtrl(dt.DefaultView, gvMsg, AspNetPager1); } }