------------------------------------------------------------
To control excess data to display in gridview cell
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) {
if (e.Row.RowType == DataControlRowType.DataRow)
{
ViewState["Data"] = e.Row.Cells[1].Text;
if (e.Row.Cells[1].Text.Length > 25)
{
e.Row.Cells[1].Text = e.Row.Cells[1].Text.Substring(0, 25) + “…”;
e.Row.Cells[1].ToolTip = ViewState["Data"].ToString();
}
-----------------------
Saturday, October 2, 2010
To control excess data to display in gridview cell
Saturday, October 02, 2010 Posted by Vikas SharmaLabels: GeneralTips n Tricks
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment