Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1650
ValueBasedAppearance and Tooltips
posted

I have been reading a lot of posts pertaining to setting tooltips for a cell, however I have seen nothing that addresses, displaying tooltips based on ValueBasedAppearance.

In my scenario I am creating ValueBasedAppearences at runtime. This occurs as part of Initialization. In many cases the ValueBasedAppearence sets up the use of 1 of many images to be displayed along with the data in the cell. What I would like to do is set the tooltip of the cell based on the ValueBasedAppearence.

Is this possible?

Is there another way to do this?

Parents
  • 28407
    posted

    HI,

     Each Cell in the WinGrid has a ToolTipText.

     You can set this property in the WinGrids InitializeRow event.

     Here is a code snippet:

       private void ultraGrid1_InitializeRow(object sender, Infragistics.Win.UltraWinGrid.InitializeRowEventArgs e)
            {
                int id = (int) e.Row.Cells[0].Value;
                switch (id)
                {
                    case 1:
                        {
                          e.Row.Cells[0].ToolTipText = "big boss " + id;
                          break;
                        }
                    case 2:
                        {
                            e.Row.Cells[0].ToolTipText = "2nd banana " + id;
                            break;
                        }

                    default:
                        {
                            e.Row.Cells[0].ToolTipText = "every body else " + id;
                            break;

                        }
                }

     

     Sincerely,

     Matt
    Developer Support Engineer

     

     

     

Reply Children
No Data