Dim imgNormal As Image
imgNormal = My.Resources.resHelp.imgNormal
Dim imgFast As Image
imgFast = My.Resources.resHelp.imgFast
Dim imgFastest As Image
imgFastest = My.Resources.resHelp.imgFastest
If ds.Tables(0).Rows.Count > 0 Then
Dim i As Integer
For i = 0 To ds.Tables(0).Rows.Count - 1
If CStr(dgvData.Rows(i).Cells("Status").Value) = "Normal" Then
dgvData.Rows(i).Cells("StatusIcon").Value = imgNormal
dgvData.Rows(i).Cells("StatusIcon").ToolTipText = "สถานะปรกติ"
ElseIf CStr(dgvData.Rows(i).Cells("Status").Value) = "Fast" Then
dgvData.Rows(i).Cells("StatusIcon").Value = imgFast
dgvData.Rows(i).Cells("StatusIcon").ToolTipText = "สถานะเร่งด่วน"
ElseIf CStr(dgvData.Rows(i).Cells("Status").Value) = "Fastest" Then
dgvData.Rows(i).Cells("StatusIcon").Value = imgFastest
dgvData.Rows(i).Cells("StatusIcon").ToolTipText = "สถานะเร่งด่วนที่สุด"
End If
Next
End If