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. C#
  4. Re: Grid: Fill background colour to 1 column only from row

Re: Grid: Fill background colour to 1 column only from row

Scheduled Pinned Locked Moved C#
questioncssgraphicstutorial
10 Posts 4 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
    roman_s
    wrote on last edited by
    #1

    Currently I have a grid that fills rows a certain color when a certain condition is met (its a Grid from Divelements but similiar to MS)

    protected override void DrawRowBackground(Divelements.SandGrid.Rendering.RenderingContext context)

            MasterListItem M = this.DataItem as MasterListItem;
    
    
            if (M.Flags == 1) //If MasterListItem is Estimated Full, Partial, Both
            {               
                context.Graphics.FillRectangle(Brushes.LightYellow, this.Bounds);
            }
            //this.Bound
            base.DrawRowBackground(context);
    

    How do I specify this to only drawRowBackground on 1 specified column instead of the whole row of columns.? any example code?

    modified on Friday, May 14, 2010 11:05 AM

    J D 2 Replies Last reply
    0
    • R roman_s

      Currently I have a grid that fills rows a certain color when a certain condition is met (its a Grid from Divelements but similiar to MS)

      protected override void DrawRowBackground(Divelements.SandGrid.Rendering.RenderingContext context)

              MasterListItem M = this.DataItem as MasterListItem;
      
      
              if (M.Flags == 1) //If MasterListItem is Estimated Full, Partial, Both
              {               
                  context.Graphics.FillRectangle(Brushes.LightYellow, this.Bounds);
              }
              //this.Bound
              base.DrawRowBackground(context);
      

      How do I specify this to only drawRowBackground on 1 specified column instead of the whole row of columns.? any example code?

      modified on Friday, May 14, 2010 11:05 AM

      J Offline
      J Offline
      Johnny J
      wrote on last edited by
      #2

      Why not try DivElements' forum: http://community.divelements.co.uk/cs/forums/11.aspx[^] They are normally very helpfull, and you will probably get an answer quicker there than here... Good luck

      R 1 Reply Last reply
      0
      • R roman_s

        Currently I have a grid that fills rows a certain color when a certain condition is met (its a Grid from Divelements but similiar to MS)

        protected override void DrawRowBackground(Divelements.SandGrid.Rendering.RenderingContext context)

                MasterListItem M = this.DataItem as MasterListItem;
        
        
                if (M.Flags == 1) //If MasterListItem is Estimated Full, Partial, Both
                {               
                    context.Graphics.FillRectangle(Brushes.LightYellow, this.Bounds);
                }
                //this.Bound
                base.DrawRowBackground(context);
        

        How do I specify this to only drawRowBackground on 1 specified column instead of the whole row of columns.? any example code?

        modified on Friday, May 14, 2010 11:05 AM

        D Offline
        D Offline
        dan sh
        wrote on last edited by
        #3

        Did you bothered reading post#2 on top?

        R 1 Reply Last reply
        0
        • J Johnny J

          Why not try DivElements' forum: http://community.divelements.co.uk/cs/forums/11.aspx[^] They are normally very helpfull, and you will probably get an answer quicker there than here... Good luck

          R Offline
          R Offline
          roman_s
          wrote on last edited by
          #4

          I did post yesterday and no response - and usually seem like a very long time before a response. The program I took over coding was written with Sandgrid and can't switch over to MS framework grid :( This place is great almost instant responses and I love codeproject.

          J 1 Reply Last reply
          0
          • D dan sh

            Did you bothered reading post#2 on top?

            R Offline
            R Offline
            roman_s
            wrote on last edited by
            #5

            Which post are you talking about? as in the reply to my being post #2.. Ive replied but I have long support times for posting on Divelements forums... Im looking to see what I can do if lets say we were using MS Grid

            D 1 Reply Last reply
            0
            • R roman_s

              I did post yesterday and no response - and usually seem like a very long time before a response. The program I took over coding was written with Sandgrid and can't switch over to MS framework grid :( This place is great almost instant responses and I love codeproject.

              J Offline
              J Offline
              Johnny J
              wrote on last edited by
              #6

              Strange - I have found that they normally respond quite quickly (normally within 24 hours)

              1 Reply Last reply
              0
              • R roman_s

                Which post are you talking about? as in the reply to my being post #2.. Ive replied but I have long support times for posting on Divelements forums... Im looking to see what I can do if lets say we were using MS Grid

                D Offline
                D Offline
                dan sh
                wrote on last edited by
                #7

                "How to get answer to your question?" "Re:", what kind of subject is that?

                R 1 Reply Last reply
                0
                • D dan sh

                  "How to get answer to your question?" "Re:", what kind of subject is that?

                  R Offline
                  R Offline
                  roman_s
                  wrote on last edited by
                  #8

                  Oops forgot subject. Edited post

                  A 1 Reply Last reply
                  0
                  • R roman_s

                    Oops forgot subject. Edited post

                    A Offline
                    A Offline
                    AspDotNetDev
                    wrote on last edited by
                    #9

                    I take it you didn't see rule #6: Do not remove or empty a message if others have replied.

                    [Forum Guidelines]

                    A 1 Reply Last reply
                    0
                    • A AspDotNetDev

                      I take it you didn't see rule #6: Do not remove or empty a message if others have replied.

                      [Forum Guidelines]

                      A Offline
                      A Offline
                      AspDotNetDev
                      wrote on last edited by
                      #10

                      For those curious, the original question (before the author removed it) was:

                      o0romeo0o wrote:

                      Currently I have a grid that fills rows a certain color when a certain condition is met (its a Grid from Divelements but similiar to MS)

                      protected override void DrawRowBackground(Divelements.SandGrid.Rendering.RenderingContext context)
                      MasterListItem M = this.DataItem as MasterListItem;

                              if (M.Flags == 1) //If MasterListItem is Estimated Full, Partial, Both
                              {
                                  context.Graphics.FillRectangle(Brushes.LightYellow, this.Bounds);
                              }
                              //this.Bound
                              base.DrawRowBackground(context);
                      

                      How do I specify this to only drawRowBackground on 1 specified column instead of the whole row of columns.? any example code?

                      [Forum Guidelines]

                      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