Skip to main content

Issue in the Grid Graph

Comments

1 comment

  • Dapfor Team

    Hi,

    This is a normal behaviour of the Grid. While drawing it knows nothing about custom painting and if there is no specified format, the grid takes a text by calling object.ToString() method. In your case it will be 'Collection'

    There are many ways to resolve the problem.

    1. Setup an EmptyFormat for the property, returning the collection:

    class YourClass
    {
        [Format(typeof(EmptyFormat))]
        IList History
        {
           ...
        }
    }


    2. Setup this format for the specified column:

    grid.Headers[0]["History"].Format = new EmptyFormat();


    3. Replace text in the grid.PaintCell event:

    grid.PaintCell += delegate(object sender, PaintCellEventArgs e)
    {
       if(e.Cell.Column != null && e.Cell.Column.Id == "History")
       {
           e.Text = string.Empty;
           e.PaintAll();
           e.Handled = true;
          
    //your code here   
           ...
       }
    };


    More information about data formatting you can find here:
    http://www.dapfor.com/en/net-suite/net-grid/tutorial/data-formatting-and-presentation

    Best regards,
    Dapfor

    0

Please sign in to leave a comment.

Powered by Zendesk