Greetings to All!
I have a datagirdview for showing results for a particular factor. Now what matter is the last two columns,
when the value of Column "A" is Positive the Value for Column "B" should call the value of Column "A" something like ; "A Months".
However if the value of Column "A" is negative, column "B" should show "For Renewal"
Here are the codes that i tried, they dont work as expected:
If dgvmainpage.Columns(5).ValueType.IsValueType <= "0" Then
dgvmainpage.DefaultCellStyle.Format = "For Renewal"
dgvmainpage.RowsDefaultCellStyle.Format = "For Renewal"
dgvmainpage.RowTemplate.Selected = "For Renewal"
ElseIf dgvmainpage.Columns(5).ValueType.IsValueType >= "1" Then
dgvmainpage.DefaultCellStyle.Format = "# 'Months'"
dgvmainpage.RowsDefaultCellStyle.Format = "# 'Months'"
dgvmainpage.RowTemplate.Selected = "# 'Months'"
Your kind reply would be greatly appreciated.
Jim
I have a datagirdview for showing results for a particular factor. Now what matter is the last two columns,
when the value of Column "A" is Positive the Value for Column "B" should call the value of Column "A" something like ; "A Months".
However if the value of Column "A" is negative, column "B" should show "For Renewal"
Here are the codes that i tried, they dont work as expected:
If dgvmainpage.Columns(5).ValueType.IsValueType <= "0" Then
dgvmainpage.DefaultCellStyle.Format = "For Renewal"
dgvmainpage.RowsDefaultCellStyle.Format = "For Renewal"
dgvmainpage.RowTemplate.Selected = "For Renewal"
ElseIf dgvmainpage.Columns(5).ValueType.IsValueType >= "1" Then
dgvmainpage.DefaultCellStyle.Format = "# 'Months'"
dgvmainpage.RowsDefaultCellStyle.Format = "# 'Months'"
dgvmainpage.RowTemplate.Selected = "# 'Months'"
Your kind reply would be greatly appreciated.
Jim