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

Radgrid databind client side scroll up in Firefox

2 Answers 40 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Iason Demiros
Top achievements
Rank 1
Iason Demiros asked on 03 Oct 2013, 01:45 PM
Hello,
I have a little problem with my page and firefox. I have in my page a radgrid that databind in client side. Multiple rows can be selected. In each row there is a link-image that open a radwindow with javasript. After the radwindow closes and some changes have been made at the data i force with javasrcipt the radgrid to rebind in order to get and show the new data.
And here is the problem
My radgrid has 100 pagesize If i click the link/image near the bottom or somewhere in the middle of the page  to open the window and the row is not selected after the rebind, in Firefox only, the page scroll up and i loose the row that i wanted to change.

If i select/check the row first and then click the link/image after the rebind the page does not scroll the same happens if i choose more than one rows. It works properly. The scroll up happens only in firefox 24.0, my latest version, in chrome works just fine.
Here is my radgrid
<telerik:RadGrid ID="dltBroadcast" EnableViewState="false" runat="server" AllowPaging="true"
                                    AllowSorting="True" PageSize="100" AllowMultiRowSelection="True" ClientSettings-EnableRowHoverStyle="True"
                                    Width="956px" CellPadding="0" CellSpacing="0" Skin="RadGridCustomBlack" EnableEmbeddedSkins="False">
                                    <PagerStyle Mode="NextPrevAndNumeric" Position="TopAndBottom" HorizontalAlign="Justify"
                                        AlwaysVisible="True" />
                                    <MasterTableView ClientDataKeyNames="ElementId,SentimentDesc,CrawledDateTime" AllowMultiColumnSorting="true"
                                        TableLayout="Fixed">
                                        <Columns>
                                            <telerik:GridBoundColumn DataField="ElementId" HeaderText="ElementId" ReadOnly="True"
                                                UniqueName="colElementId" Visible="False">
                                            </telerik:GridBoundColumn>
                                            <telerik:GridClientSelectColumn UniqueName="SelectColumn" DataTextField="ElementId"
                                                Resizable="false">
                                                <HeaderStyle Width="30px" />
                                            </telerik:GridClientSelectColumn>
                                            <telerik:GridTemplateColumn ItemStyle-HorizontalAlign="Left" ItemStyle-Width="25px"
                                                HeaderStyle-Width="25px" UniqueName="colSentiment" Visible="True" ItemStyle-BorderStyle="None"
                                                Resizable="false">
                                                <ItemTemplate>
                                                    <div>
                                                        <a id="linkSentimentPositive" runat="server">
                                                            <img id="ImageSentimentPositive" runat="server" width="15" height="14" border="0"
                                                                alt="" src="Images/positiveNormal.png" class="dtgridSentimentImages" /></a>
                                                        <br />
                                                        <a id="linkSentimentNeutral" runat="server">
                                                            <img id="ImageSentimentNeutral" runat="server" width="15" height="14" border="0"
                                                                alt="" src="Images/neutralNormal.png" class="dtgridSentimentImages" /></a>
                                                        <br />
                                                        <a id="linkSentimentNegative" target="_self" runat="server">
                                                            <img id="ImageSentimentNegative" runat="server" width="15" height="14" border="0"
                                                                alt="" src="Images/negativeNormal.png" class="dtgridSentimentImages" /></a>
                                                        <br />
                                                        <a id="linkSentimentUnassigned" runat="server">
                                                            <img id="ImageSentimentUnassigned" runat="server" width="15" height="14" border="0"
                                                                alt="" src="Images/unassignedNormal.png" /></a>
                                                    </div>
                                                </ItemTemplate>
                                            </telerik:GridTemplateColumn>
                                            <telerik:GridHyperLinkColumn DataTextField="Title" UniqueName="colTitle" HeaderText="Title"
                                                ItemStyle-Font-Underline="true" ItemStyle-Width="180px" HeaderStyle-Width="180px"
                                                ItemStyle-Wrap="true" SortExpression="Title">
                                                <HeaderStyle Font-Bold="True" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                    Font-Underline="False" HorizontalAlign="Center" Wrap="False" />
                                                <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                    Font-Underline="False" HorizontalAlign="Center" BorderStyle="None" Wrap="True" />
                                            </telerik:GridHyperLinkColumn>
                                            <telerik:GridBoundColumn DataField="Snippet" HeaderText="Snippet" ItemStyle-Width="200px"
                                                HeaderStyle-Width="200px" ReadOnly="false" UniqueName="colSnippet">
                                                <HeaderStyle Font-Bold="True" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                    Font-Underline="False" HorizontalAlign="Center" Wrap="False" />
                                                <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                    Font-Underline="False" HorizontalAlign="Left" BorderStyle="None" Wrap="True" />
                                            </telerik:GridBoundColumn>
                                            <telerik:GridBoundColumn DataField="Tags" HeaderText="Keywords" ReadOnly="True" UniqueName="colkeywords"
                                                ItemStyle-Width="70px">
                                                <HeaderStyle Font-Bold="True" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                    Font-Underline="False" HorizontalAlign="Center" Wrap="False" />
                                                <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                    Font-Underline="False" HorizontalAlign="Center" BorderStyle="None" Wrap="True" />
                                            </telerik:GridBoundColumn>
                                            <telerik:GridBoundColumn DataField="HostNameToShow" HeaderText="Source" ReadOnly="True"
                                                UniqueName="colHostName" ItemStyle-Width="80px">
                                                <HeaderStyle Font-Bold="True" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                    Font-Underline="False" HorizontalAlign="Center" Wrap="False" />
                                                <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                    Font-Underline="False" HorizontalAlign="Center" BorderStyle="None" Wrap="True" />
                                            </telerik:GridBoundColumn>
                                            <telerik:GridBoundColumn DataField="CrawledDateTime" HeaderText="Date" DataType="System.DateTime"
                                                ItemStyle-Width="70px" HeaderStyle-Width="70px" DataFormatString="{0:dd/MM/yyyy HH:mm}"
                                                ReadOnly="True" UniqueName="colCrawledDateTime">
                                                <HeaderStyle Font-Bold="True" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                    Font-Underline="False" HorizontalAlign="Center" Wrap="False" />
                                                <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                    Font-Underline="False" HorizontalAlign="Center" BorderStyle="None" Wrap="True" />
                                            </telerik:GridBoundColumn>
                                            <telerik:GridBoundColumn DataField="TagName" HeaderText="User Tags" ReadOnly="True"
                                                UniqueName="colTags">
                                                <HeaderStyle Font-Bold="True" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                    Font-Underline="False" HorizontalAlign="Center" Wrap="False" />
                                                <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                    Font-Underline="False" HorizontalAlign="Center" BorderStyle="None" Wrap="True" />
                                            </telerik:GridBoundColumn>
                                            <telerik:GridTemplateColumn UniqueName="colButtons" Visible="True" ItemStyle-Width="55px"
                                                HeaderStyle-Width="55px" ItemStyle-BorderStyle="None" Resizable="false">
                                                <ItemTemplate>
                                                    <div style="position: relative;">
                                                        <a id="linkTag" runat="server">
                                                            <img id="ImageTag" runat="server" width="13" height="13" border="0" title="Tag" alt="Tag"
                                                                src="Images/tag.gif" class="dtgridButtonsLeft" /></a> <a id="linkdelete" runat="server">
                                                                    <img id="Imgdelete" runat="server" width="13" height="13" border="0" title="Delete"
                                                                        alt="Delete" src="Images/delete.gif" class="dtgridButtonsRight" /></a><br />
                                                        <a id="linkSendEmail" runat="server">
                                                            <img id="ImgSendEmail" runat="server" width="13" height="13" border="0" title="Email"
                                                                alt="Email" src="Images/email.gif" class="dtgridButtonsLeft" /></a> <a id="LinkHighlited"
                                                                    runat="server">
                                                                    <img id="ImgHighlited" runat="server" width="12" height="12" border="0" title="Highlight"
                                                                        alt="Highlight" src="Images/highlighted.png" class="dtgridButtonsRight" /></a><br />
                                                        <a id="linkEnagagedCommunity" runat="server" style="width: 13px; height: 13px; position: absolute;
                                                            bottom: -18px; left: 0;">
                                                            <img id="ImgEnagagedCommunity" runat="server" width="13" height="13" border="0" title="Whois?"
                                                                alt="Whois?" src="Images/editUserInfo.gif" /></a><a id="LinkUrlAspect" runat="server"
                                                                    style="text-align: right; position: absolute; bottom: -16px; right: 0;">
                                                                    <img id="ImgUrlAspect" runat="server" width="10" height="10" border="0" title="Add to Community..."
                                                                        alt="Add to Community..." src="Images/addToCummunity.png" style="margin-right: 5px;" />
                                                                </a>
                                                    </div>
                                                </ItemTemplate>
                                            </telerik:GridTemplateColumn>
                                        </Columns>
                                    </MasterTableView>
                                    <ClientSettings>
                                        <ClientEvents OnCommand="dltBroadcast_Command" OnRowDataBound="dltBroadcast_RowDataBound"
                                            OnColumnClick="dltBroadcast_ColumnClick"  />
                                        <Selecting AllowRowSelect="true" />
                                        <Resizing AllowColumnResize="True" AllowRowResize="false" ResizeGridOnColumnResize="false"
                                            ClipCellContentOnResize="true" EnableRealTimeResize="true" AllowResizeToFit="true" />
                                        <Scrolling AllowScroll="false" UseStaticHeaders="false"></Scrolling>
                                    </ClientSettings>
                                </telerik:RadGrid>

Is there anything i can do or is something with firefox?



2 Answers, 1 is accepted

Sort by
0
Venelin
Telerik team
answered on 08 Oct 2013, 08:25 AM
Hello Iason,

Without seeing the actual JavaScript code it is hard to say where exactly the problem resides. It would be better if you open a formal support ticket and send a project that is replicating the issue so we can test and debug it. In this manner I will be able to come up with more straightforward solution. In the meantime could you try to use a slightly different approach for data editing (if it is possible in your case): Grid - PopUp Edit Form?

Regards,
Venelin
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
Iason Demiros
Top achievements
Rank 1
answered on 09 Oct 2013, 12:45 PM
Hi,
I found the problem. It was the radWindow beacause i open every window in the page with an anchor whose href points to a, it loses focus.
I fix it by setting the href to javascript:void(0) and using the onclick event.

This thread helped http://www.telerik.com/community/forums/aspnet-ajax/window/radwindow-opening-and-scrolling-back-to-the-top-of-the-page.aspx

Thanks.
Tags
Grid
Asked by
Iason Demiros
Top achievements
Rank 1
Answers by
Venelin
Telerik team
Iason Demiros
Top achievements
Rank 1
Share this question
or