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

Nested Grid loose data when pager button gets hit

3 Answers 56 Views
Grid
This is a migrated thread and some comments may be shown as answers.
naimish
Top achievements
Rank 1
naimish asked on 08 Oct 2010, 10:04 PM
Hi  All,

I am facing weired issue, i have a nested radgrid2 which is placed inside a top level radgrid1.

Radgrid1 has two columns, the 1st one work as primary key for Radgrid2.
Both works fine, but whenever i click the navigation button of Radgrid 2, it loose the data and after that it display
"No Data to display"


Kindly see the inline code as well as attached screen-shots.
-----------------
Code ascx
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Most.ascx.cs"
    Inherits="Most%>
<%@ Register Assembly="Telerik.Web.UI, Version=2010.1.309.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4"
    Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">

    <script type="text/javascript" language="javascript">


        //sharepoint postback to work after clicking on telerik export to pdf
        if (typeof (_spBodyOnLoadFunctionNames) != 'undefined' && _spBodyOnLoadFunctionNames != null) {
            _spBodyOnLoadFunctionNames.push("supressSubmitWraper");
        }
        function supressSubmitWraper() {
            _spSuppressFormOnSubmitWrapper = true;

        }
             
        var tableView = null;
        function pageLoad(sender, args) {
            tableView = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
        }

        function RadComboBox1_SelectedIndexChanged(sender, args) {
            tableView.set_pageSize(sender.get_value());
        }

        function changePage(argument) {
            tableView.page(argument);
        }

        function RadNumericTextBox1_ValueChanged(sender, args) {
            tableView.page(sender.get_value());
        }
       
    </script>

</telerik:RadScriptBlock>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<%--/*****************************************/--%>
<table width="980px">
    
    <tr>
        <td valign="top">
            <table width="240px">
                <tr>
                    <td>
                        <asp:UpdatePanel ID="UpdatePanel3" runat="server">
                            <ContentTemplate>
                                <table class="xyx-columnwidth">
                                    
                                    <tr >
                                        <td>
                                            <table>
                                                
                                                <tr>
                                                    <td align="right">
                                                       
                                                        <asp:Button ID="BtnLookup" runat="server" CssClass="xyx-sumbitbtn" OnClick="BtnLookup_Click"
                                                            OnClientClick="" Text="Submit" />
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                </table>
                            </ContentTemplate>
                        </asp:UpdatePanel>
                    </td>
                </tr>
          
}


3 Answers, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 14 Oct 2010, 11:58 AM
Hi naimish,

Can you try debugging the page and see if the Selecting event is fired when you page the inner grid? Also check if placing the ObjectDataSource declaration above this of RadGrid2 makes any difference?

Greetings,
Iana
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
naimish
Top achievements
Rank 1
answered on 23 Feb 2011, 10:49 AM
Hi,
Whenever i try to select page size from dropdown, the on selecting method gets call, but this time, the item data bound of main radgrid
does not get called, where iam setting input parameter to the radlistview.

Due to that in this time the input parameter gets empty.
Am i doing something wrong, i enabled inbuilt paging by doing allow paging true for nested radlistview not made any custom paging, than why it is happening.
0
Iana Tsolova
Telerik team
answered on 25 Feb 2011, 02:22 PM
Hi naimish,

Can you send a sample page code, using dummy data for instance, which I could run locally and see what happens there?

Greetings,
Iana
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
Grid
Asked by
naimish
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
naimish
Top achievements
Rank 1
Share this question
or