This is a migrated thread and some comments may be shown as answers.

[Solved] pop control on grid not showing correctly

3 Answers 146 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 1
Kevin asked on 22 Jul 2013, 02:42 PM
I have a pop-up that works with the radgrid and on past grid it owrks fine, when I scroll the pop-up shows next to the line that i mouse over.  Fro some reason on this grid as soon as I scroll the pop-up always shows near the top of the screene of the grid instead of next to the row I am highlighting the label, at this point I ma lost as to what i could be.  the service works and the popup works, it just when I scroll down the grid the pop-up returns the correct info but shows always at top of the screen and grid half shown instead of next to row I am mousing over.

telerik Grid.
<telerik:GridTemplateColumn HeaderText="DMOS">
                                <ItemTemplate>
                                    <asp:Label ID="lblDMOS" runat="server" Text='<%#Bind("DMOS")%>'></asp:Label>
                                    <asp:PopupControlExtender ID="popInfo" runat="server" PopupControlID="pnlPop" TargetControlID="lblDMOS" DynamicContextKey='<% #Eval("DMOS")%>'
                                    DynamicControlID="pnlpop" DynamicServiceMethod="GetMOS" Position="Right"></asp:PopupControlExtender>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
 
 
Pop-up that it calls
 <asp:Panel ID="pnlPop" runat="server" style="display:none"></asp:Panel>
 
 
Item created event of the Radgrid
 Protected Sub myRadVacancy_ItemCreated(sender As Object, e As GridItemEventArgs) Handles myRadVacancy.ItemCreated
        If TypeOf e.Item Is GridDataItem Then
            Dim pce As PopupControlExtender = TryCast(e.Item.FindControl("popInfo"), PopupControlExtender)
 
            Dim behaviorID As String = "pce_" + e.Item.RowIndex.ToString
            pce.BehaviorID = behaviorID
 
            Dim lbl As Label = DirectCast(e.Item.FindControl("lblDMOS"), Label)
 
            Dim OnMouseOverScript As String = String.Format("$find('{0}').showPopup();", behaviorID)
            Dim OnMouseOutScript As String = String.Format("$find('{0}').hidePopup();", behaviorID)
 
            lbl.Attributes.Add("onmouseover", OnMouseOverScript)
            lbl.Attributes.Add("onmouseout", OnMouseOutScript)
        End If
    End Sub
 
Sergvice that it all calls
 
 'Serice for the MOS
    <System.Web.Services.WebMethod(), System.Web.Script.Services.ScriptMethodAttribute()> _
    Public Shared Function GetMOS(contextKey As String) As String
 
        Dim sb As New StringBuilder()
 
        sql = "Select strMOS, strJobTitle, strRemarks from MOSDescription where SUBSTRING(strMOS, 1,3) like '" & contextKey.Substring(0, 3) & "'"
 
        myDataTable = New DataTable
        myDataTable = getData(sql)
 
        If myDataTable.Rows.Count > 0 Then
            sb.Append("<table style='background-color:#f3f3f3; border: #ADC9F7 3px solid; ")
            sb.Append("width:260px; font-size:10pt; font-family:Verdana;' cellspacing='0' cellpadding='3'>")
            sb.Append("<tr><td colspan='3' style='background-color:#ADC9F7; color:white;'>")
            sb.Append("<b>MOS " + myDataTable.Rows(0)(0).ToString() + "</b>")
            sb.Append("</td></tr>")
            sb.Append("<tr><td style='width:400px;'> " + myDataTable.Rows(0)(1).ToString() + "</td></tr>")
            sb.Append("<tr><td style='width:400px;'> " + myDataTable.Rows(0)(2).ToString() + "</td></tr>")
            sb.Append("</table>")
        End If
        Return sb.ToString()
    End Function

3 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 25 Jul 2013, 04:23 PM
Hello Kevin,

Can you specify if the popup shows near the top of the screen while you are scrolling RadGrid? If this is the case you can try setting SaveScrollPosition property to true inside grid ClientSettings.Scrolling and see if it makes any difference.

Regards,
Pavlina
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Kevin
Top achievements
Rank 1
answered on 25 Jul 2013, 04:39 PM
Hi Pavlina,
ok, I tired this but still has no effect on the popup, it should be showing right by the row per the code behind, it is fine in the grid but as soon as I scroll the grid the pop-up then only shows half the pop-up and its at the top of the grid, so half show and half does not.  It is very stange to me  since it works on other grid and I did the same thing for this one just different project and they all work fine.  I don't see difference in code.
0
Pavlina
Telerik team
answered on 30 Jul 2013, 02:46 PM
Hello Kevin,

To be able to assist you further, we should replicate the issue on our side. Can you open a support ticket and send us a sample runnable project where the problem can be observed, so we can investigate what is causing it?

Regards,
Pavlina
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Grid
Asked by
Kevin
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Kevin
Top achievements
Rank 1
Share this question
or