1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

cell value formatting

Discussion in 'C#' started by maplecutie, May 29, 2016.

  1. maplecutie

    maplecutie New Member

    Joined:
    May 25, 2016
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    hi, am a bit new to Dapfor .Net Grid. Am trying to format my cell value properly but don’t seem to work it out using the below code. Pardon me if the mistakes are obvious


    grid.PaintCell +=== delegate(object sender, PaintCellEventArgs e)
    {
    if(e.Cell.Column != == null && e.Cell.Column.Id == "some id")
    {
    e.Text = "a new text to be displayed in cell";
    }
    };
     
  2. sobort84

    sobort84 New Member

    Joined:
    May 25, 2016
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    hey! Spotted some errors with your code. But I’ve modified it. Hope it helps

    grid.PaintCell += delegate(object sender, PaintCellEventArgs e)
    {
    if(e.Cell.Column != null && e.Cell.Column.Id == "some id")
    {
    e.Text = "a new text to be displayed in cell";
    }
    };
     
  3. Er. Babu Mastan

    Er. Babu Mastan New Member

    Joined:
    Sep 26, 2016
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Gender:
    Male
    what are you asking about cell
    cell of excel sheet or data base
     

Share This Page