Re: Grid: Fill background colour to 1 column only from row
-
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
-
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
-
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
-
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
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.
-
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.
-
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
-
I take it you didn't see rule #6: Do not remove or empty a message if others have replied.
-
I take it you didn't see rule #6: Do not remove or empty a message if others have replied.
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?