Home Forums WinForms controls Xceed Grid for WinForms Custom CellViewerManager groupBy text

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #17712 |

    Hi, 

    I’ve created a custom  CellViewerManager that displays an image by overrideing the GetImageCore method. The cell shouldn’t contain any text.

    However, when I group by the column I want text to be displayed. I’ve override the GetTextCore method but only display the text if it’s a group header, not if it’s a normal cell. How can I do this?

     Thanks

     Mat  

            protected override string GetTextCore(object value, CellTextFormatInfo formatInfo, GridElement gridElement)

            {

                // Pseudo Code

                if (gridElement is Group Header )

                {

                    return value.ToString();

                }

                else

                {

                    return String.Empty;

                }

            } 

     

     

     

    Imported from legacy forums. Posted by Mat (had 787 views)

    User (Old forums)
    Member
    Post count: 23064

    I answered my own question.

     

            protected override string GetTextCore(object value, CellTextFormatInfo formatInfo, GridElement gridElement)

            {

                // 

                if (gridElement is DataBoundColumn)

                {

                    return value.ToString();

                }

                else

                {

                    return String.Empty;

                }

            } 

    Imported from legacy forums. Posted by Mat (had 723 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.