Click here to Skip to main content
15,891,777 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Posted
Comments
jim lahey 7-Nov-12 7:44am    
Is this a question?
SoumenBanerjee 7-Nov-12 8:26am    
you have found example with code to use, so now what is your requirement?

1 solution

The below ought to get you started.

Within the aspx page enable page methods within your ajax script manager.
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true" EnablePageMethods="true" />


Template column below. The commented out image was using onmouseover which is what you're looking for. The example below displays a image to be clicked on to display the details.
<asp:TemplateField>
                            <HeaderTemplate>
                                <asp:Image id="imgLineItems" runat="server" ImageUrl="/Images/LineItems.gif" AlternateText="" ToolTip="PO Details" />
                            </HeaderTemplate>
                            <ItemTemplate>
                                <%--<asp:ImageButton id="Attachments" runat="server" ImageUrl="~/Images/clip.gif" commandArgument='<%# Eval(Container.DataItem, "JobID") %>'
                                    commandName='<%# Eval(Container.DataItem, "POID") >' OnClientClick="return false;" onmouseover="$find('pceAttachments').showPopup();" onmouseout="$find('pceAttachments').hidePopup();"   />--%>
                                <asp:Image id="imgLineItems" runat="server" ImageUrl="/Images/LineItems.gif" AlternateText=""  />
                                <asp:Panel ID="pnlLineItems" runat="server"></asp:Panel>
                                &lt;asp:PopupControlExtender ID="pceLineItems" runat="server" DynamicServiceMethod="GetLineItems"
                                     DynamicContextKey='<%# Eval("POID") %>'
                                     DynamicControlID="pnlLineItems"
                                     TargetControlID="imgLineItems"
                                     PopupControlID="pnlLineItems"
                                     Position="right">
                                </asp:PopupControlExtender>
                                <asp:DropShadowExtender runat="server" ID="FileDownloadDropShadow"  Opacity=".25" Width="2" TargetControlID="pnlLineItems"
                                    TrackPosition="true"></asp:DropShadowExtender>
                            </ItemTemplate>
                        </asp:TemplateField>


Code Behind:

VB
System.Web.Services.WebMethod()> _
		Public Shared Function GetLineItems(ByVal contextKey As String) As String
			Return BOs.POLineItem.LineItemsPopUp(contextKey)
		End Function
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900