Click here to Skip to main content
15,921,226 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: How to add a button column to the datagrid using vb.net2003 Pin
tatchung28-Jul-08 22:58
tatchung28-Jul-08 22:58 
AnswerRe: How to add a button column to the datagrid using vb.net2003 Pin
chandralekha4-Aug-08 20:06
chandralekha4-Aug-08 20:06 
QuestionHow do I detect which Application get focus at run-time? Pin
Anubhava Dimri28-Jul-08 22:05
Anubhava Dimri28-Jul-08 22:05 
AnswerRe: How do I detect which Application get focus at run-time? Pin
Thomas Stockwell29-Jul-08 10:31
professionalThomas Stockwell29-Jul-08 10:31 
QuestionHow to read excel file Pin
BalasubramanianK28-Jul-08 20:48
BalasubramanianK28-Jul-08 20:48 
AnswerRe: How to read excel file Pin
Nilesh Hapse28-Jul-08 22:36
Nilesh Hapse28-Jul-08 22:36 
AnswerRe: How to read excel file Pin
rprateek5-Aug-08 17:50
rprateek5-Aug-08 17:50 
QuestionHow to color some cells of table row based upon condition [modified] Pin
Rameez Raja28-Jul-08 18:26
Rameez Raja28-Jul-08 18:26 
hi,

iam unable to color the cells of table i did coding like this but not able to get result any one please suggest me where iam doing mistake .

Dim tbl As Table = New Table()
Dim tr As TableRow = New TableRow()
Dim tc As TableCell = New TableCell()
tc.ColumnSpan = 4
tc.RowSpan = 1
tc.Text = "8AM"
tr.Cells.Add(tc)
Table1.Rows.Add(tr)
Dim tc1 As TableCell = New TableCell
tc1.ColumnSpan = 4
tc1.RowSpan = 1
tc1.Text = "9AM"
tr.Cells.Add(tc1)
Table1.Rows.Add(tr)
Dim tc2 As TableCell = New TableCell
tc2.ColumnSpan = 4
tc2.RowSpan = 1
tc2.Text = "10AM"
tr.Cells.Add(tc2)
Table1.Rows.Add(tr)
Dim tc3 As TableCell = New TableCell
tc3.ColumnSpan = 4
tc3.RowSpan = 1
tc3.Text = "11AM"
tr.Cells.Add(tc3)
Table1.Rows.Add(tr)
Dim tc4 As TableCell = New TableCell
tc4.ColumnSpan = 4
tc4.RowSpan = 1
tc4.Text = "12PM"
tr.Cells.Add(tc4)
Table1.Rows.Add(tr)
Dim tc5 As TableCell = New TableCell
tc5.ColumnSpan = 4
' tc5.RowSpan = 1
tc5.Text = "1PM"
tr.Cells.Add(tc5)
Table1.Rows.Add(tr)

Dim tc6 As TableCell = New TableCell
tc6.ColumnSpan = 4
tc6.RowSpan = 1
tc6.Text = "2PM"
tr.Cells.Add(tc6)
Table1.Rows.Add(tr)

Dim tc7 As TableCell = New TableCell
tc7.ColumnSpan = 4
tc7.RowSpan = 1
tc7.Text = "3PM"
tr.Cells.Add(tc7)
Table1.Rows.Add(tr)

here row is not created problem

Dim tr2 As TableRow = New TableRow
Dim trcell As TableCell = New TableCell
Dim i As Integer
Dim MyArray() As Integer = {0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
For i = 0 To 31
If MyArray(i) = 1 Then
trcell.BackColor = Drawing.Color.Green
Else
trcell.BackColor = Drawing.Color.Yellow

End If
tr2.Cells.Add(trcell)

Next
Table1.Rows.Add(tr2)

In above code second row is not displaying please suggest me where iam wrong .


Regards
Rameez

modified on Tuesday, July 29, 2008 1:52 AM

AnswerRe: How to color some cells of table row based upon condition Pin
Paul Conrad28-Jul-08 20:06
professionalPaul Conrad28-Jul-08 20:06 
Questionproblem to detect client after server crash Pin
shee_dee8628-Jul-08 15:22
shee_dee8628-Jul-08 15:22 
AnswerRe: problem to detect client after server crash Pin
Luc Pattyn28-Jul-08 16:16
sitebuilderLuc Pattyn28-Jul-08 16:16 
QuestionFlippable 3D List Items in WPF Pin
sumeetneo28-Jul-08 10:16
sumeetneo28-Jul-08 10:16 
AnswerRe: Flippable 3D List Items in WPF Pin
ChandraRam29-Jul-08 1:23
ChandraRam29-Jul-08 1:23 
GeneralRe: Flippable 3D List Items in WPF Pin
sumeetneo29-Jul-08 4:24
sumeetneo29-Jul-08 4:24 
QuestionDon't load .ocx at runtime Pin
cstrader23228-Jul-08 9:44
cstrader23228-Jul-08 9:44 
GeneralRe: Don't load .ocx at runtime Pin
Paul Conrad28-Jul-08 9:54
professionalPaul Conrad28-Jul-08 9:54 
GeneralRe: Don't load .ocx at runtime Pin
cstrader23228-Jul-08 10:07
cstrader23228-Jul-08 10:07 
Questioncreate button programmatically for loop Pin
khm628-Jul-08 9:00
khm628-Jul-08 9:00 
AnswerRe: create button programmatically for loop Pin
Steven J Jowett28-Jul-08 10:18
Steven J Jowett28-Jul-08 10:18 
QuestionSearch/Evaluate My.Settings.StringCollection Pin
Member 437233128-Jul-08 8:12
Member 437233128-Jul-08 8:12 
AnswerRe: Search/Evaluate My.Settings.StringCollection Pin
paas29-Jul-08 0:47
paas29-Jul-08 0:47 
GeneralRe: Search/Evaluate My.Settings.StringCollection Pin
Member 437233129-Jul-08 2:41
Member 437233129-Jul-08 2:41 
GeneralRe: Search/Evaluate My.Settings.StringCollection Pin
paas29-Jul-08 3:26
paas29-Jul-08 3:26 
GeneralRe: Search/Evaluate My.Settings.StringCollection Pin
Member 437233129-Jul-08 3:38
Member 437233129-Jul-08 3:38 
QuestionExport to Excel or html [modified] Pin
zzsoulzz28-Jul-08 7:27
zzsoulzz28-Jul-08 7:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.