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
520
How to display a tooltip for a CellButton
posted

Hi,

I added a cellbutton to my wingrid using column.Style = UltraWinGrid.ColumnStyle.EditButton. Now I want to add a tooltip for the cellbutton.How can I do this. I could not find a tooptip property...

Thanks for any help!

 

Cheers

Michael

Parents
No Data
Reply
  • 469350
    Offline posted

    I've attached a file here that will make this a lot simpler to do. Simply include the attach class file in your project. 

    To use it, you need to do two things. First, you have to assign the CreationFilter to your grid. Copy this line of code into your Form_Load or the constructor of your main form or any similar event that fires once when the grid is initialized. You will need to do this for any grid's in your application that you want to show tooltips on the edit button. 

    this.ultraGrid1.CreationFilter = CellEditButtonElementToolTipCreationFilter.VALUE;

    Then you can assign a tooltip to all of the Edit buttons in a column like so:

    column.SetEditButtonToolTipText("Click here for more information.");

    The InitializeLayout would be a good event in which to do this. 

    Or, if you need different tooltip text on each cell, you can assign an edit button tooltip to the cell like so:

    string buttonToolTip = string.Format("Button Tooltip: {0}", cell.Text);
    cell.SetEditButtonToolTipText(buttonToolTip);

    The InitializeRow event would be appropriate for this. 

    EditButtonToolTipProvider.zip

Children
No Data