Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. help me with this... urgent... code below...

help me with this... urgent... code below...

Scheduled Pinned Locked Moved Visual Basic
help
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    ransomed_guy
    wrote on last edited by
    #1

    It should be from blue to red gradient color... the backcolors of these rows return green gradient... please help me revise the code... thanks... Protected Sub GridView1_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles GridView1.DataBound Dim red As Integer = &HFF0000 Dim blue As Integer = &HFF Dim green As Integer = &HFF00 Dim noRows As Integer Dim incDiff As Integer Dim currentColor As Integer noRows = GridView1.Rows.Count incDiff = (red / green) / noRows currentColor = green For x As Integer = 0 To noRows - 1 GridView1.Rows(x).BackColor = Color.FromArgb(currentColor) currentColor += incDiff Next End Sub

    C G 2 Replies Last reply
    0
    • R ransomed_guy

      It should be from blue to red gradient color... the backcolors of these rows return green gradient... please help me revise the code... thanks... Protected Sub GridView1_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles GridView1.DataBound Dim red As Integer = &HFF0000 Dim blue As Integer = &HFF Dim green As Integer = &HFF00 Dim noRows As Integer Dim incDiff As Integer Dim currentColor As Integer noRows = GridView1.Rows.Count incDiff = (red / green) / noRows currentColor = green For x As Integer = 0 To noRows - 1 GridView1.Rows(x).BackColor = Color.FromArgb(currentColor) currentColor += incDiff Next End Sub

      C Offline
      C Offline
      Capt_Thanas
      wrote on last edited by
      #2

      im' not really that good with VB.net but i dont see anything mentioning the color blue in that code. Maybe someone else knows what it is, but im not sure if that's it. -Think not of the problem But of the solution! -Mind what people do, not what they say, for deeds will betray an lie. -The only sovereign you can allow to rule you is reason. -Contradictions don't exist, in whole or in part.

      1 Reply Last reply
      0
      • R ransomed_guy

        It should be from blue to red gradient color... the backcolors of these rows return green gradient... please help me revise the code... thanks... Protected Sub GridView1_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles GridView1.DataBound Dim red As Integer = &HFF0000 Dim blue As Integer = &HFF Dim green As Integer = &HFF00 Dim noRows As Integer Dim incDiff As Integer Dim currentColor As Integer noRows = GridView1.Rows.Count incDiff = (red / green) / noRows currentColor = green For x As Integer = 0 To noRows - 1 GridView1.Rows(x).BackColor = Color.FromArgb(currentColor) currentColor += incDiff Next End Sub

        G Offline
        G Offline
        Guffa
        wrote on last edited by
        #3

        Why are you asking the same question again? Follow up in the thread that is already active instead. --- b { font-weight: normal; }

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups