Hi all
I have datagridview that shows tasks to be done by user.One of gridview column shows priority of task as icon.Now i want to add tooltiptext to icon as "high priority, low priority or medium".

Hi,

try using this

<ItemTemplate>
                        <asp:Image 
                        ToolTip='<%# (DataBinder.Eval(Container.DataItem, "Title").ToString().ToLower() == "mr")? "High priority" : ((DataBinder.Eval(Container.DataItem, "Title").ToString().ToLower() == "ms")?"Medium priority":"Low priority" ) %>' 
                        runat="server" AlternateText="" ID="imgPriority" 
                        ImageUrl='<%# (DataBinder.Eval(Container.DataItem, "Title").ToString().ToLower() == "mr")? "/Testweb/images/Mr.gif" : ((DataBinder.Eval(Container.DataItem, "Title").ToString().ToLower() == "ms")?"/Testweb/images/Ms.gif":"/Testweb/images/Mrs.gif" ) %>' />
                        </ItemTemplate>

Hi
My problem is solved::idea i got from yours code.
Thank yo;u p.k chaudhry

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.