This is a migrated thread and some comments may be shown as answers.

create a Tooltip for the header of a GridViewColumnGroup

0 Answers 77 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Daniela
Top achievements
Rank 1
Daniela asked on 07 Aug 2012, 10:48 AM
Hi!
I'm looking for a solution to create a Tooltip in the header of a GridViewColumnGroup.

I tried it that way:
GridViewColumnGroup columngroup = new GridViewColumnGroup();
                 
               TextBlock header_block = new TextBlock();
               header_block.Text = purpose.LevelCode;
                ToolTipService.SetToolTip(header_block, purpose.DisplayName);
 
                columngroup.Header = header_block;
                columngroup.Name = purpose.Id.ToString();
                _visibilityTable.ColumnGroups.Add(columngroup);


but it is not possible -> Exception occures

I tried it another way and set the Tooltip directly to the columngroup but this gave a runtime Exception because the columngroup is not an UI Element.

Is there another possibility (that works)?
Tags
GridView
Asked by
Daniela
Top achievements
Rank 1
Share this question
or