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 Column Event Help - Need to fill Grid column with text on the fly

Re: Grid Column Event Help - Need to fill Grid column with text on the fly

Scheduled Pinned Locked Moved C#
questioncssdatabasegraphicshelp
1 Posts 1 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

    Thanks to everyone for you help in advance. I have a Grid that currently has a column that does not fill with data from the db but with an image depending on a condtion met. What is the same method but not a rendering method that draws a graphic but rather fills cell with text. something like: if (D.Flags == 1) { ........?? //Draw Text = "Warning" }

    namespace Freepour.Studio.Controls.Grid
    {

    public class InventoryWorksheetGridImageColumn : GridImageColumn
    {
    

    .....

    protected override void DrawCell(Divelements.SandGrid.Rendering.RenderingContext context, GridRow row, object value, Font rowFont, Image image, Rectangle bounds, bool selected, Divelements.SandGrid.Rendering.TextFormattingInformation textFormat, Color foreColor)
    {
    float x = (2) + bounds.Left;
    float y = (1) + bounds.Top;
    float width = 16.0F;
    float height = 16.0F;

            object O = row.DataItem;
            DownloadAudit D = O as DownloadAudit;
    
            if (D.Flags == 1)
            {
                context.Graphics.DrawImage(ExclusionImage, x, y, width, height);
            }
    
    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