How to set UltraToolTipeInfo in perticular row in win ultra grid control.

Answered (Verified) This post has 1 verified answer | 12 Replies | 2 Followers Thread's RSS feed.

awadhendra
Points 165
Replied On: Wed, Feb 29 2012 5:23 AM Reply

Hi,

I am using Infragistics New Advantage Ultra Win Grid Control. I want to show tool tip message on ultra win grid row. Tool tip message should have image and formatted text. Different different rows have different different tool tip message. For completing this task I used UltraToolTipInfo and UltraToolTipManager class but I was not able to done it.

How can I apply tooltip message on selected row only not on UltraWinGrid control.

Thanks.

  • Post Points: 20

Verified Answer

awadhendra
Points 165
Answered (Verified) Replied On: Fri, Mar 2 2012 9:53 AM Reply
Verified by awadhendra

I had solve this problem.

Following link help me to solve it.

http://blogs.infragistics.com/forums/p/3027/17287.aspx\

This code work for me.

private void igrdAgentPool_MouseEnterElement(object sender, UIElementEventArgs e)

{

if (e.Element is Infragistics.Win.UltraWinGrid.CellUIElement)

{

// Get a refernce to the column.

Infragistics.Win.UltraWinGrid.UltraGridColumn column = (Infragistics.Win.UltraWinGrid.UltraGridColumn)e.Element.GetContext();

// Show the tooltip only when it is over the "Delete" column.

if (column.Key == "Delete")

{

Infragistics.Win.UltraWinToolTip.UltraToolTipInfo tipInfo =

new Infragistics.Win.UltraWinToolTip.UltraToolTipInfo("Click button to delete record.", ToolTipImage.Info, "Delete Record", DefaultableBoolean.True);

// Set the tooltip and it will be displayed automatically based on the tooltip manager settings.

ultraToolTipManager.SetUltraToolTip(igrdAgentPool, tipInfo);

//ultraToolTipManager.ShowToolTip(igrdAgentPool);

}

else

ultraToolTipManager.HideToolTip();

}

}

private void igrdAgentPool_MouseLeave(object sender, EventArgs e)

{

ultraToolTipManager.HideToolTip();

ultraToolTipManager.SetUltraToolTip(igrdAgentPool, null);

}

Thanks for your help.

  • Post Points: 25

All Replies

Replied On: Wed, Feb 29 2012 7:01 AM Reply

Hello,

Could you please review the sample attached to this post and see if it meets your requirements.

Please feel free to let me know if I misunderstood you or if you have any other questions.


Best regards,

Boris

Development Team Lead, MCPD
Infragistics, Inc.

How to get answers =>

  • Post Points: 35
awadhendra
Points 165
Replied On: Wed, Feb 29 2012 8:24 AM Reply

Thanks for quick reply.

It's work for me.

  • Post Points: 5
awadhendra
Points 165
Replied On: Wed, Feb 29 2012 9:13 AM Reply

Hi,

I had used attached sample send by you. But It's exactly not which I want. Attached sample is always show tooltip but I want that only few rows whose checkbox column is checked are able to show tooltip not other.

I have datagrid view which have two column. one is checkbox and other one is data. When checkbox column of row is checked then tooltip is displayed only when cursor is on that row otherwise it dont display tooltip.

I hope you understand my requirement.

thanks

  • Post Points: 5
awadhendra
Points 165
Replied On: Thu, Mar 1 2012 7:28 AM Reply

I am not able to complete this job. Please help me. Is it possible or not with infragistics ultra win grid control.

  • Post Points: 20
Replied On: Thu, Mar 1 2012 7:49 AM Reply

Hello,

Could you please review the sample attached to this post and see if it meets your requirements.

Please feel free to let me know if I misunderstood you or if you have any other questions.


Best regards,

Boris

Development Team Lead, MCPD
Infragistics, Inc.

How to get answers =>

  • Post Points: 35
awadhendra
Points 165
Replied On: Thu, Mar 1 2012 9:15 AM Reply

Attached sample did not complete my requirements. It shows tooltip on every row. Let me explain my problem in more detail.

I have a ultra win grid control which have 3 columns. First one is checkbox column, second and theird is simple textbox column. Now suppose ultra grid view have 20 records. I want to show ultratool tip on those rows only whose checkbox column is checked means when focus is on checked row otherwise it don't show ultra tool tip. Tooltip message can be differ for different checked row.

Maybe it is clear to understand you.

  • Post Points: 5
awadhendra
Points 165
Replied On: Thu, Mar 1 2012 10:09 AM Reply

I have ultra win grid which contains 2 columns. First one is checkbox and second one is simple column. I have 20 records in ultra grid. Suppose checkbox column of 10 records is checked. Some rows whose checkbox column is checked have background orange, green and yellow. I want to show ultra tooltip message only on those rows whose checkbox column is checked and have row background as orange not for green or yellow.

Thanks.

  • Post Points: 5
awadhendra
Points 165
Replied On: Thu, Mar 1 2012 10:11 AM Reply

I have ultra win grid which contains 2 columns. First one is checkbox and second one is simple column. I have 20 records in ultra grid. Suppose checkbox column of 10 records is checked. Some rows whose checkbox column is checked have background orange, green and yellow. I want to show ultra tooltip message only on those rows whose checkbox column is checked and have row background as orange not for green or yellow.

Maybe My previous message was not able to describe my requirements completly. Help me !!!

Thanks.

  • Post Points: 20
Replied On: Thu, Mar 1 2012 10:17 AM Reply

Hello,

I believe that the scenario you are describing is like the one from my last sample. If you feel that I do not understand you well, please if possible provide a sample project of your own, I will be happy to make it work for you.

Please do not hesitate to contact us if you need any additional assistance.


Best regards,

Boris

Development Team Lead, MCPD
Infragistics, Inc.

How to get answers =>

  • Post Points: 20
awadhendra
Points 165
Replied On: Thu, Mar 1 2012 10:53 AM Reply

I am sending you a code.

 

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Windows.Forms;

using Infragistics.Win.UltraWinGrid;

using Infragistics.Win.UltraWinToolTip;

 

namespace WindowsFormsApplication366

{

    public partial class Form1 : Form

    {

        public Form1()

        {

            InitializeComponent();

 

            ultraGrid1.DataSource = GetTable();

        }

 

        static DataTable GetTable()

        {

            DataTable table = new DataTable();

            table.Columns.Add("Checkbox", typeof(bool));

            table.Columns.Add("Drug", typeof(string));

 

            table.Rows.Add(true, "Indocin");

            table.Rows.Add(false, "Enebrel");

            table.Rows.Add(true, "Hydralazine");

            table.Rows.Add(false, "Combivent");

            table.Rows.Add(true, "Dilantin");

 

            return table;

        }

 

        UltraToolTipInfo infoRow;

        RowUIElement currentRow;

        private void ultraGrid1_MouseEnterElement(object sender, Infragistics.Win.UIElementEventArgs e)

        {

            if (e.Element.GetAncestor(typeof(RowUIElement)) != null)

            {

                currentRow = (RowUIElement)e.Element.GetAncestor(typeof(RowUIElement)) as RowUIElement;

               

                ///If row background color have ornge then only on that row tooltip message show.

                if ((currentRow != null && (bool)currentRow.Row.Cells["Checkbox"].Value == true) && currentRow.Row.Appearance.BackColor == Color.Orange)

                {

                    infoRow = new UltraToolTipInfo(currentRow.Row.Index.ToString(), Infragistics.Win.ToolTipImage.Info, currentRow.Row.GetType().ToString(), Infragistics.Win.DefaultableBoolean.True);

                    ultraToolTipManager1.SetUltraToolTip(ultraGrid1, infoRow);

                    ultraToolTipManager1.ShowToolTip(ultraGrid1);

                }

            }

        }

 

        private void ultraGrid1_MouseLeaveElement(object sender, Infragistics.Win.UIElementEventArgs e)

        {

            ultraToolTipManager1.HideToolTip();

        }

 

        private void Form1_Load(object sender, EventArgs e)

        {

            ultraGrid1.Rows[0].Appearance.BackColor = Color.Orange;

            ultraGrid1.Rows[2].Appearance.BackColor = Color.Green;

            ultraGrid1.Rows[4].Appearance.BackColor = Color.Yellow;

        }

    }

}

 

 

 

  • Post Points: 20
Replied On: Fri, Mar 2 2012 1:54 AM Reply

Hello,

I tried this and it always works fine for me so I attached my sample to this post for you. Please review it and feel free to let me know if I misunderstood you or if you have any other questions.


Best regards,

Boris

Development Team Lead, MCPD
Infragistics, Inc.

How to get answers =>

  • Post Points: 5
awadhendra
Points 165
Answered (Verified) Replied On: Fri, Mar 2 2012 9:53 AM Reply
Verified by awadhendra

I had solve this problem.

Following link help me to solve it.

http://blogs.infragistics.com/forums/p/3027/17287.aspx\

This code work for me.

private void igrdAgentPool_MouseEnterElement(object sender, UIElementEventArgs e)

{

if (e.Element is Infragistics.Win.UltraWinGrid.CellUIElement)

{

// Get a refernce to the column.

Infragistics.Win.UltraWinGrid.UltraGridColumn column = (Infragistics.Win.UltraWinGrid.UltraGridColumn)e.Element.GetContext();

// Show the tooltip only when it is over the "Delete" column.

if (column.Key == "Delete")

{

Infragistics.Win.UltraWinToolTip.UltraToolTipInfo tipInfo =

new Infragistics.Win.UltraWinToolTip.UltraToolTipInfo("Click button to delete record.", ToolTipImage.Info, "Delete Record", DefaultableBoolean.True);

// Set the tooltip and it will be displayed automatically based on the tooltip manager settings.

ultraToolTipManager.SetUltraToolTip(igrdAgentPool, tipInfo);

//ultraToolTipManager.ShowToolTip(igrdAgentPool);

}

else

ultraToolTipManager.HideToolTip();

}

}

private void igrdAgentPool_MouseLeave(object sender, EventArgs e)

{

ultraToolTipManager.HideToolTip();

ultraToolTipManager.SetUltraToolTip(igrdAgentPool, null);

}

Thanks for your help.

  • Post Points: 25
Page 1 of 1 (13 items) | RSS