Public Sub PerformLoad() Try lvwMain_default.Items.Clear() Dim mitem As ListViewItem 'Dim frmLgn As New frmLogin Dim DataSt As New DataSet Dim sqlSelIss As String = "select IssID, Descrptn,_status,priority,First_name,Last_Name from User_Details where Emp_ID = issDtl.created_by as Name,Created_On from Issue_Details as issDtl where project_id = '" proId.ToString "'" DataSt = DataStore.GetDataset(sqlSelIss, sqlConnStr) For Each row As DataRow In DataSt.Tables(0).Rows mitem = New ListViewItem mitem.Text = row.Item("IssID") mitem.SubItems.Add(row.Item("Descrptn")) ' status column return a boolean value, ' i want to show Active for True and Inactive ' for False mitem.SubItems.Add(row.Item("Status")) mitem.SubItems.Add(row.Item("priority")) mitem.SubItems.Add(row.Item("Name")) mitem.SubItems.Add(row.Item("Created_On")) lvwMain_default.Items.Add(mitem) Next Catch ex As Exception MsgBox(ex.ToString) End Try End Sub
If row.Item("Status").toString = "True" then mitem.subItems.Add("Active") ElseIf row.Item("Status").toString = "False" then mitem.subItems.Add("Inactive") End If<pre>
If row.Item("Status") = True Then mitem.SubItems.Add("Active").ForeColor = Color.GreenYellow ElseIf row.Item("Status") = False Then mitem.SubItems.Add("Inactive") End If
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)