Imports Microsoft.VisualBasic Imports System Imports System.Web.UI Partial Class _Default Inherits System.Web.UI.Page Protected Sub btnPdfExport_Click(ByVal sender As Object, ByVal e As EventArgs) gridExport.WritePdfToResponse() End Sub Protected Sub btnXlsExport_Click(ByVal sender As Object, ByVal e As EventArgs) gridExport.WriteXlsToResponse() End Sub Protected Sub btnXlsxExport_Click(ByVal sender As Object, ByVal e As EventArgs) gridExport.WriteXlsxToResponse() End Sub Protected Sub btnRtfExport_Click(ByVal sender As Object, ByVal e As EventArgs) gridExport.WriteRtfToResponse() End Sub Protected Sub btnCsvExport_Click(ByVal sender As Object, ByVal e As EventArgs) gridExport.WriteCsvToResponse() End Sub 'Protected Sub ASPxGridView1_CustomColumnDisplayText(ByVal sender As Object, ByVal e As DevExpress.Web.ASPxGridView.ASPxGridViewColumnDisplayTextEventArgs) Handles ASPxGridView1.CustomColumnDisplayText ' If (e.Column.FieldName <> "PtstoDate") Then Return ' If IsDBNull(e.Value) Then Return ' If Convert.ToInt32(e.Value) >= 15 Then ' e.DisplayText = "Fail" ' ElseIf (Convert.ToInt32(e.Value) < 15) Then ' e.DisplayText = "Pass" ' End If 'End Sub Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load End Sub Protected Sub ASPxGridView1_CustomUnboundColumnData(ByVal sender As Object, ByVal e As DevExpress.Web.ASPxGridView.ASPxGridViewColumnDataEventArgs) Handles ASPxGridView1.CustomUnboundColumnData If (e.Column.FieldName <> "Status") Then Return If IsDBNull(e.Value) Then Return ElseIf IsDBNull(e.GetListSourceFieldValue("PtstoDate")) = False And IsDBNull(e.GetListSourceFieldValue("PhoneHome")) = False Then Dim ptstodate As Decimal = Convert.ToDecimal(e.GetListSourceFieldValue("PtstoDate")) If ptstodate >= 15 Then e.Value = "Fail" If ptstodate < 15 Then e.Value = "Awaiting Documentation" ElseIf IsDBNull(e.GetListSourceFieldValue("PtstoDate")) = False And IsDBNull(e.GetListSourceFieldValue("PhoneHome")) = True Then Dim ptstodate As Decimal = Convert.ToDecimal(e.GetListSourceFieldValue("PtstoDate")) If ptstodate >= 15 Then e.Value = "Fail" If ptstodate < 15 Then e.Value = "Pass" End If 'If ptstodate >= 15 Then e.Value = "Fail" 'If ptstodate < 15 Then e.Value = "Awaiting Documentation" 'If IsDBNull(e.GetListSourceFieldValue("PhoneHome")) And unitPrice >= 15 Then e.Value = "Fail" 'If IsDBNull(e.GetListSourceFieldValue("PhoneHome")) And unitPrice < 15 Then e.Value = "Pass" End Sub End Class