protected void grvLicense_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { lwg_LicenseForm license = (lwg_LicenseForm)e.Row.DataItem; Literal ltrType = (Literal)e.Row.FindControl("ltrType"); if (license != null && ltrType != null) { ltrType.Text = LicenseBiz.GetLicenseType(license.LicenseType); } } }