RadGrid paging-change inside update reloads the whole page

Thread is closed for posting
4 posts, 1 answers
  1. Shady
    Shady avatar
    13 posts
    Member since:
    Oct 2016

    Posted 22 Nov 2016 Link to this post

    I have a radGrid inside a panel which is controlled by an ajaxupdatepanel to show "ajaxloadingpanel" while it is retrieving data from the server. When any button is clicked outside the radGrid, the ajaxloadingpanel is displayed, however when i change the page of the radgrid, the whole page is reloaded, which is not what I want (it should reload the radGrid only). Below is my code:

     

    <%@ Page Title="" Language="VB" MasterPageFile="~/web/MasterPage.master" AutoEventWireup="false" CodeFile="Requests.aspx.vb" Inherits="web_grm_Requests" %>

    <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
        <style>
            body {
                background-color:white;
            }
            .MyGridClass .rgDataDiv {
                height: auto !important;
            }

            .showOnHover > * {
                visibility: hidden;
            }
            
            .rgRow:hover .showOnHover > *,
            .rgAltRow:hover .showOnHover > * {
                visibility: visible;
            }
            .RadGrid .rgHoveredRow
            {
                background-color:dodgerblue !important;
            }
        </style>
        <script type="text/javascript">
           function pageLoad() {
                var grid = $find("<%= RadGrid1.ClientID %>");
                var columns = grid.get_masterTableView().get_columns();
                for (var i = 0; i < columns.length; i++) {
                    columns[i].resizeToFit(false, true);
                }
            }
            function openWin(URL,RadWindow) {
                radopen(URL, RadWindow);
                return false;
            }
        </script>
    </asp:Content>
    <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="pnlPage">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="pnlPage" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
        </telerik:RadAjaxLoadingPanel>
        <asp:Panel ID="pnlPage" DefaultButton="btnFake" runat="server"><asp:Button ID="btnFake" runat="server" Visible="false" />
            <telerik:RadRibbonBar ID="RadRibbonBar1" runat="server" Width="100%" Font-Size="12px" EnableMinimizing="true" Skin="Silk" 
                EnableQuickAccessToolbar="false" RenderInactiveContextualTabGroups="False" Font-Names="Lucida Sans Unicode">
                <telerik:RibbonBarTab Text="Basic">
                    <telerik:RibbonBarGroup Text="Shortcuts">
                        <Items>
                            <telerik:RibbonBarButton ID="btnNew1" Size="Large" onclick="openWin('AddNew.aspx','rwAddNew')" Text="Add New" ToolTip="Add a new request" ImageUrlLarge="~/images/view-22.png"></telerik:RibbonBarButton>
                            <telerik:RibbonBarButton ID="btnRefresh1" Size="Large" Text="Refresh" ToolTip="Refresh requests" ImageUrlLarge="~/images/view-23.png"></telerik:RibbonBarButton>
                            <telerik:RibbonBarButton ID="btnReset1" Size="Large" Text="Reset" ToolTip="Reset View" ImageUrlLarge="~/images/view-28.png"></telerik:RibbonBarButton>
                        </Items>
                    </telerik:RibbonBarGroup>
                    <telerik:RibbonBarGroup Text="Views">
                        <Items>
                            <telerik:RibbonBarToggleList>
                                <ToggleButtons>
                                    <telerik:RibbonBarToggleButton ID="btnViewPersonal" Size="Large" Text="Personal" ToolTip="View all requests assigned to me" ImageUrlLarge="~/images/view-0.png"></telerik:RibbonBarToggleButton>
                                    <telerik:RibbonBarToggleButton ID="btnViewDepartment" Size="Large" Text="Department" ToolTip="View all requests assigned to my department" ImageUrlLarge="~/images/view-1.png"></telerik:RibbonBarToggleButton>
                                    <telerik:RibbonBarToggleButton ID="btnViewProperty" Size="Large" Text="Property" ToolTip="View all requests for my property" ImageUrlLarge="~/images/view-9.png"></telerik:RibbonBarToggleButton>
                                </ToggleButtons>
                            </telerik:RibbonBarToggleList>
                        </Items>
                    </telerik:RibbonBarGroup>
                    <telerik:RibbonBarGroup Text="Status">
                        <Items>
                            <telerik:RibbonBarToggleButton ID="btnViewUnassigned" Size="Medium" Text="Unassigned" ToolTip="View all requests pending for assignment" ImageUrl="~/images/view-5s.png"></telerik:RibbonBarToggleButton>
                            <telerik:RibbonBarToggleButton ID="btnViewInprogress" Size="Medium" Text="In-progress" ToolTip="View all in-progress requests" ImageUrl="~/images/view-25s.png"></telerik:RibbonBarToggleButton>
                            <telerik:RibbonBarToggleButton ID="btnViewCompleted" Size="Medium" Text="Completed" ToolTip="View all completed requests" ImageUrl="~/images/view-10s.png"></telerik:RibbonBarToggleButton>
                        </Items>
                    </telerik:RibbonBarGroup>
                    <telerik:RibbonBarGroup Text="Filter">
                        <Items>
                            <telerik:RibbonBarToggleList >
                                <ToggleButtons>
                                    <telerik:RibbonBarToggleButton ID="btnViewDelayed" Size="Medium" Text="Delayed" ToolTip="View all delayed requests" ImageUrl="~/images/view-4s.png"></telerik:RibbonBarToggleButton>
                                    <telerik:RibbonBarToggleButton ID="btnViewDueToday" Size="Medium" Text="Due Today" ToolTip="View all requests due today" ImageUrl="~/images/view-12s.png"></telerik:RibbonBarToggleButton>
                                    <telerik:RibbonBarToggleButton ID="btnViewSurvey" Size="Medium" Text="To Survey" ToolTip="View all requests pending for survey" ImageUrl="~/images/view-7s.png"></telerik:RibbonBarToggleButton>
                                    <telerik:RibbonBarToggleButton ID="btnViewComplaints" Size="Medium" Text="Complaints" ToolTip="View all complaints" ImageUrl="~/images/view-27s.png"></telerik:RibbonBarToggleButton>
                                    <telerik:RibbonBarToggleButton ID="btnViewAll" Size="Medium" Text="All" ToolTip="View all requests" ImageUrl="~/images/view-25s.png"></telerik:RibbonBarToggleButton>
                                </ToggleButtons>
                            </telerik:RibbonBarToggleList>
                        </Items>
                    </telerik:RibbonBarGroup>
                    <telerik:RibbonBarGroup Text="Search by">
                        <Items>
                            <telerik:RibbonBarControlGroup Orientation="Vertical">
                                <telerik:RibbonBarTemplateItem>
                                    <telerik:RadTextBox ID="txtSearchIdRoom" Width="93px" ToolTip="Enter Request ID or Room" runat="server" Skin="WebBlue" Resize="None"></telerik:RadTextBox>
                                </telerik:RibbonBarTemplateItem>
                                <telerik:RibbonBarButton ID="btnSearchByID" Size="Medium" Text="Request ID" Width="55px" ImageUrl="~/images/view-8s.png"></telerik:RibbonBarButton>
                                <telerik:RibbonBarButton ID="btnSearchByRoom" Size="Medium" Text="Room No." Width="55px" ImageUrl="~/images/view-8s.png"></telerik:RibbonBarButton>
                            </telerik:RibbonBarControlGroup>
                        </Items>
                    </telerik:RibbonBarGroup>
                </telerik:RibbonBarTab>
                <telerik:RibbonBarTab Text="Advance">
                    <telerik:RibbonBarGroup Text="Shortcuts">
                        <Items>
                            <telerik:RibbonBarButton ID="btnNew2" Size="Large" onclick="openWin('AddNew.aspx','rwAddNew')" Text="Add New" ToolTip="Add a new request" ImageUrlLarge="~/images/view-22.png"></telerik:RibbonBarButton>
                            <telerik:RibbonBarButton ID="btnRefresh2" Size="Large" Text="Refresh" ToolTip="Refresh requests" ImageUrlLarge="~/images/view-23.png"></telerik:RibbonBarButton>
                            <telerik:RibbonBarButton ID="btnReset2" Size="Large" Text="Reset" ToolTip="Reset View" ImageUrlLarge="~/images/view-28.png"></telerik:RibbonBarButton>
                        </Items>
                    </telerik:RibbonBarGroup>
                    <telerik:RibbonBarGroup Text="Advance Filter">
                        <Items>
                            <telerik:RibbonBarControlGroup Orientation="Horizontal">
                                <telerik:RibbonBarControlGroup Orientation="Vertical">
                                    <telerik:RibbonBarToggleButton Size="Medium" Width="65px" Text="Unassigned" ToolTip="Click to include unassigned requests" ImageUrl="~/images/view-10s.png"></telerik:RibbonBarToggleButton>
                                    <telerik:RibbonBarToggleButton Size="Medium" Width="65px" Text="In-progress" ToolTip="Click to include in-progress requests" ImageUrl="~/images/view-10s.png"></telerik:RibbonBarToggleButton>
                                    <telerik:RibbonBarToggleButton Size="Medium" Width="65px" Text="Completed" ToolTip="Click to include completed requests" ImageUrl="~/images/view-10s.png"></telerik:RibbonBarToggleButton>
                                </telerik:RibbonBarControlGroup>
                            </telerik:RibbonBarControlGroup>
                            <telerik:RibbonBarControlGroup Orientation="Vertical">
                                <telerik:RibbonBarTemplateItem>
                                    <telerik:RadComboBox ID="ddlType" runat="server" Width="120px" Skin="WebBlue" EmptyMessage="request type" AutoPostBack="True" DataSourceID="SqlDataSource3" DataTextField="Type" DataValueField="ID" MarkFirstMatch="True"></telerik:RadComboBox>
                                    <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:grmConnectionString %>" SelectCommand="SELECT [Type], [Description], [ID] FROM [tbl_request_type] WHERE ([Property_ID] = @Property_ID) AND ([Disabled] <> 1 or [Disabled] IS NUll) ORDER BY [Type]">
                                        <selectparameters>
                                        <asp:SessionParameter Name="Property_ID" SessionField="Property_ID" Type="Int32" />
                                    </selectparameters>
                                    </asp:SqlDataSource>
                                    <br />
                                    <telerik:RadComboBox ID="ddlCategory" runat="server" Width="120px" Skin="WebBlue" AutoPostBack="True" EmptyMessage="category" DataSourceID="SqlDataSource4" DataTextField="Category" DataValueField="ID" MarkFirstMatch="True"></telerik:RadComboBox>
                                    <asp:SqlDataSource ID="SqlDataSource4" runat="server" ConnectionString="<%$ ConnectionStrings:grmConnectionString %>" SelectCommand="SELECT [Category], [Description], [ID] FROM [tbl_category] WHERE ([Type_ID] = @Type_ID) AND ([Disabled] <> 1 or [Disabled] IS NUll) ORDER BY [Category]">
                                        <selectparameters>
                                        <asp:ControlParameter ControlID="ddlType" Name="Type_ID" PropertyName="SelectedValue" Type="Int32" />
                                    </selectparameters>
                                    </asp:SqlDataSource>
                                    <br />
                                    <telerik:RadComboBox ID="ddlSubcategory" runat="server" Width="120px" Skin="WebBlue" AutoPostBack="True" EmptyMessage="subcategory" DataSourceID="SqlDataSource5" DataTextField="Subcategory" DataValueField="ID" MarkFirstMatch="True"></telerik:RadComboBox>
                                    <asp:SqlDataSource ID="SqlDataSource5" runat="server" ConnectionString="<%$ ConnectionStrings:grmConnectionString %>" SelectCommand="SELECT [ID], [Subcategory], [Description] FROM [tbl_subcategory] WHERE ([Category_ID] = @Category_ID) AND ([Disabled] <> 1 or [Disabled] IS NUll) order by Subcategory">
                                        <selectparameters>
                                        <asp:ControlParameter ControlID="ddlCategory" Name="Category_ID" PropertyName="SelectedValue" Type="Int32" />
                                    </selectparameters>
                                    </asp:SqlDataSource>
                                </telerik:RibbonBarTemplateItem>
                            </telerik:RibbonBarControlGroup>
                            <telerik:RibbonBarControlGroup Orientation="Vertical">
                                <telerik:RibbonBarTemplateItem>
                                    <telerik:RibbonBarTemplateItem>
                                        <telerik:RadComboBox ID="ddlLocType" runat="server" Width="120px" Skin="WebBlue" EmptyMessage="area" AutoPostBack="True" DataSourceID="SqlDataSource1" DataTextField="Area" DataValueField="ID" MarkFirstMatch="True"></telerik:RadComboBox>
                                        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:grmConnectionString %>" SelectCommand="SELECT [Area], [ID] FROM [tbl_loc_area] WHERE ([Property_ID] = @Property_ID) AND ([Disabled] <> 1 or [Disabled] IS NUll) ORDER BY [Area]">
                                            <selectparameters>
                                            <asp:SessionParameter Name="Property_ID" SessionField="Property_ID" Type="Int32" />
                                        </selectparameters>
                                        </asp:SqlDataSource>
                                        <br />
                                        <telerik:RadComboBox ID="ddlLocation" runat="server" Width="120px" Skin="WebBlue" AutoPostBack="True" EmptyMessage="location" DataSourceID="SqlDataSource2" DataTextField="Room" DataValueField="ID" MarkFirstMatch="True"></telerik:RadComboBox>
                                        <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:grmConnectionString %>" SelectCommand="SELECT [Room], [ID] FROM [tbl_loc_room] WHERE ([Area_ID] = @Area_ID) AND ([Disabled] <> 1 or [Disabled] IS NUll) ORDER BY [Room]">
                                            <selectparameters>
                                            <asp:ControlParameter ControlID="ddlLocType" Name="Area_ID" PropertyName="SelectedValue" Type="Int32" />
                                        </selectparameters>
                                        </asp:SqlDataSource>
                                        <br />
                                        <telerik:RadTextBox ID="txtGuestName" Width="120px" EmptyMessage="guest name" runat="server" Skin="WebBlue" Resize="None" LabelWidth="88px"></telerik:RadTextBox>
                                    </telerik:RibbonBarTemplateItem>
                                </telerik:RibbonBarTemplateItem>
                            </telerik:RibbonBarControlGroup>
                            <telerik:RibbonBarControlGroup Orientation="Vertical">
                                <telerik:RibbonBarTemplateItem>
                                    <telerik:RibbonBarTemplateItem>
                                        <telerik:RadComboBox ID="ddlDepartment" runat="server" Width="120px" Skin="WebBlue" AutoPostBack="True" EmptyMessage="department" MarkFirstMatch="True" DataSourceID="SqlDataSource6" DataTextField="Name" DataValueField="ID"></telerik:RadComboBox>
                                        <asp:SqlDataSource ID="SqlDataSource6" runat="server" ConnectionString="<%$ ConnectionStrings:grmConnectionString %>" SelectCommand="SELECT [ID], [Name] FROM [tbl_department] WHERE ([Property_ID] = @Property_ID) AND ([Disabled] <> 1 or [Disabled] IS NUll) ORDER BY [Name]">
                                            <selectparameters>
                                            <asp:SessionParameter Name="Property_ID" SessionField="Property_ID" Type="Int32" />
                                        </selectparameters>
                                        </asp:SqlDataSource>
                                        <br />
                                        <telerik:RadComboBox ID="ddlAttendee" runat="server" Width="120px" Skin="WebBlue" EmptyMessage="attendee" MarkFirstMatch="True" DataSourceID="SqlDataSource7" DataTextField="Name" DataValueField="ID"></telerik:RadComboBox>
                                        <asp:SqlDataSource ID="SqlDataSource7" runat="server" ConnectionString="<%$ ConnectionStrings:grmConnectionString %>" SelectCommand="SELECT [Name], [ID] FROM [tbl_employee] WHERE ([Department_ID] = @Department_ID) AND ([Disabled] <> 1 or [Disabled] IS NUll) ORDER BY [Name]">
                                            <selectparameters>
                                            <asp:ControlParameter ControlID="ddlDepartment" Name="Department_ID" PropertyName="SelectedValue" Type="Int32" />
                                        </selectparameters>
                                        </asp:SqlDataSource>
                                        <br />
                                        <telerik:RadComboBox ID="ddlRequester" runat="server" Width="120px" Skin="WebBlue" EmptyMessage="requester" MarkFirstMatch="True" DataSourceID="SqlDataSource8" DataTextField="Name" DataValueField="ID"></telerik:RadComboBox>
                                        <asp:SqlDataSource ID="SqlDataSource8" runat="server" ConnectionString="<%$ ConnectionStrings:grmConnectionString %>" SelectCommand="SELECT [Name], [ID] FROM [tbl_employee] WHERE ([Disabled] <> 1 or [Disabled] IS NUll) ORDER BY [Name]"></asp:SqlDataSource>
                                    </telerik:RibbonBarTemplateItem>
                                </telerik:RibbonBarTemplateItem>
                            </telerik:RibbonBarControlGroup>
                            <telerik:RibbonBarButton ID="btnFilterAdvanced" Size="Large" Text="Filter" ToolTip="Click to filter" ImageUrlLarge="~/images/view-13.png"></telerik:RibbonBarButton>
                        </Items>
                    </telerik:RibbonBarGroup>
                </telerik:RibbonBarTab>
            </telerik:RadRibbonBar>
            
            <asp:Label ID="lblWhereClause1" Visible="false" runat="server" ></asp:Label>
            <asp:Label ID="lblWhereClause2" Visible="false" runat="server"></asp:Label>
            <asp:Label ID="lblWhereClause3" Visible="false" runat="server"></asp:Label>
            <asp:Label ID="lblWhereClause3a" Visible="false" runat="server"></asp:Label>
            <asp:Label ID="lblWhereClause3b" Visible="false" runat="server"></asp:Label>
            <asp:Label ID="lblWhereClause3c" Visible="false" runat="server"></asp:Label>
        <asp:Panel ID="pnlGrid" runat="server" Width="100%">
                    <asp:Timer ID="timerRefresh" Interval="5000" runat="server"></asp:Timer>
                    <telerik:RadGrid ID="RadGrid1" CssClass="MyGridClass" runat="server" ShowGroupPanel="True" Font-Names="Lucida Sans Unicode"
                        AllowSorting="True" AllowPaging="True" Skin="Metro" AutoGenerateColumns="False">
                        <MasterTableView GroupLoadMode="server" ShowGroupFooter="True" GroupsDefaultExpanded="True" AllowAutomaticInserts="False"
                            AllowMultiColumnSorting="True" GridLines="Horizontal" BorderStyle="None" Width="50%">
                            <CommandItemSettings ShowExportToExcelButton="True" ShowExportToPdfButton="True" />
                            <Columns>
                                <telerik:GridBoundColumn DataField="ID" Resizable="true" FilterControlAltText="Filter No. column" HeaderText="No." SortExpression="ID" UniqueName="ID" />
                                <telerik:GridTemplateColumn Resizable="false" ItemStyle-Width="45px" HeaderStyle-Width="45px">
                                    <ItemTemplate>
                                        <asp:Image ID="imgDelayedClose" ImageUrl="~/images/flag-0m.png" ToolTip="Request not completed on time" Visible="false" runat="server" />
                                        <asp:Image ID="imgDelayedAssign" ImageUrl="~/images/view-29m.png" ToolTip="Request not assigned on time" Visible="false" runat="server" />
                                        <asp:Image ID="imgComplaint" ImageUrl="~/images/view-27mr.png" ToolTip="Request flagged as a complaint" Visible="false" runat="server" />
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridBoundColumn DataField="Status" Resizable="true" FilterControlAltText="Filter Status column" HeaderText="Status" SortExpression="Status" UniqueName="Status" />
                                <telerik:GridBoundColumn DataField="ScheduledAt" ItemStyle-Wrap="false" Resizable="true" FilterControlAltText="Filter Scheduled At column" HeaderText="Scheduled At" SortExpression="ScheduledAt" DataFormatString="{0:ddd dd/MM hh:mmtt}" UniqueName="ScheduledAt" />
                                <telerik:GridBoundColumn DataField="Area" Resizable="true" FilterControlAltText="Filter Area column" HeaderText="Area" SortExpression="Area" UniqueName="Area" />
                                <telerik:GridBoundColumn DataField="Room" Resizable="true" FilterControlAltText="Filter Room column" HeaderText="Room" SortExpression="Room" UniqueName="Room" />
                                <telerik:GridBoundColumn DataField="RequestType" Resizable="true" FilterControlAltText="Filter Type column" HeaderText="Type" SortExpression="RequestType" UniqueName="RequestType" />
                                <telerik:GridBoundColumn DataField="Category" Resizable="true" FilterControlAltText="Filter Category column" HeaderText="Category" SortExpression="Category" UniqueName="Category" />
                                <telerik:GridBoundColumn DataField="Subcategory" Resizable="true" FilterControlAltText="Filter Subcategory column" HeaderText="Subcategory" SortExpression="Subcategory" UniqueName="Subcategory" />
                                <telerik:GridBoundColumn DataField="Department" Resizable="true" FilterControlAltText="Filter Department column" HeaderText="Department" SortExpression="Department" UniqueName="Department" />
                                <telerik:GridBoundColumn DataField="Attendee" Resizable="true" FilterControlAltText="Filter Attendee column" HeaderText="Attendee" SortExpression="Attendee" UniqueName="Attendee" />
                                <telerik:GridTemplateColumn ItemStyle-CssClass="showOnHover" Resizable="true">
                                    <ItemTemplate>
                                        <input type="image" src="../../images/view-16m.png" title="Details" id="btnDetails" onclick="openWin('Details.aspx?id=<%#Eval("ID")%>    ','rwDetails')" />&nbsp;
                                        <input type="image" src="../../images/view-0m.png" title="Assign" id="btnAssign" onclick="openWin('Assign.aspx?id=<%#Eval("ID")%>    ','rwAssign')" />&nbsp;
                                        <input type="image" src="../../images/view-24m.png" title="Update" id="btnUpdate" onclick="openWin('Update.aspx?id=<%#Eval("ID")%>    ','rwUpdate')" />&nbsp;
                                        <input type="image" src="../../images/view-27m.png" title="Complaint" id="btnComplaint" onclick="openWin('Complaint.aspx?id=<%#Eval("ID")%>    ','rwComplaint')" />&nbsp;
                                        <input type="image" src="../../images/view-10m.png" title="Complete" id="btnClose" onclick="openWin('Close.aspx?id=<%#Eval("ID")%>    ','rwClose')" />&nbsp;
                                        <input type="image" src="../../images/view-7m.png" title="Survey" id="btnSurvey" onclick="openWin('Survey.aspx?id=<%#Eval("ID")%>    ','rwSurvey')" />
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridBoundColumn DataField="Status_ID" HeaderStyle-CssClass="hidden" ItemStyle-CssClass="hidden" UniqueName="Status_ID" />
                                <telerik:GridBoundColumn DataField="Complaint_ID" HeaderStyle-CssClass="hidden" ItemStyle-CssClass="hidden"   UniqueName="Complaint_ID" />
                                <telerik:GridBoundColumn DataField="AssignViolated" HeaderStyle-CssClass="hidden" ItemStyle-CssClass="hidden" UniqueName="AssignViolated" />
                                <telerik:GridBoundColumn DataField="CloseViolated"  HeaderStyle-CssClass="hidden" ItemStyle-CssClass="hidden" UniqueName="CloseViolated" />
                            </Columns>
                        </MasterTableView>
                        <GroupingSettings CollapseAllTooltip="Collapse all groups"></GroupingSettings>
                        <SortingSettings />
                        <ClientSettings AllowDragToGroup="True" AllowColumnsReorder="True" ReorderColumnsOnClient="True" EnableRowHoverStyle="true">
                            <Selecting AllowRowSelect="false" />
                            <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                            <Resizing AllowColumnResize="true" ResizeGridOnColumnResize="true" AllowResizeToFit="true" />
                        </ClientSettings>
                        <ItemStyle Height="10px"></ItemStyle>
                        <PagerStyle Mode="NextPrevNumericAndAdvanced" EnableSEOPaging="True" PageSizes="10;20;50;100" SEOPagingQueryStringKey="page" />
                    </telerik:RadGrid>
            </asp:Panel>
        <telerik:RadWindowManager ID="RadWindowManager1" EnableShadow="true" VisibleStatusbar="false" runat="server" Skin="Glow" AutoSize="false" Animation="Slide" Behaviors="Minimize, Close, Pin, Move, Reload">
            <Windows>
                <telerik:RadWindow ID="rwAddNew" runat="server" Width="825px" Height="450px" Title="Add New Request"></telerik:RadWindow>
                <telerik:RadWindow ID="rwDetails" runat="server" Width="825px" Height="450px" Title="Request Details"></telerik:RadWindow>
                <telerik:RadWindow ID="rwAssign" runat="server" Width="825px" Height="450px" Title="Assign Request"></telerik:RadWindow>
                <telerik:RadWindow ID="rwUpdate" runat="server" Width="825px" Height="450px" Title="Update Request"></telerik:RadWindow>
                <telerik:RadWindow ID="rwComplaint" runat="server" Width="825px" Height="450px" Title="Raise Complaint"></telerik:RadWindow>
                <telerik:RadWindow ID="rwClose" runat="server" Width="825px" Height="450px" Title="Complete Request"></telerik:RadWindow>
                <telerik:RadWindow ID="rwSurvey" runat="server" Width="825px" Height="450px" Title="Feedback Survey"></telerik:RadWindow>
            </Windows>
        </telerik:RadWindowManager>
        </asp:Panel>
        
        
            
    </asp:Content>
  2. Shady
    Shady avatar
    13 posts
    Member since:
    Oct 2016

    Posted 22 Nov 2016 in reply to Shady Link to this post

    Is it possible that this is happening because I am binding the table from the vb.net side? It seems the RadGrid group expanding and collapsing is also not working well when i change the page size (it does not collapse). I hope you can help.
  3. Shady
    Shady avatar
    13 posts
    Member since:
    Oct 2016

    Posted 24 Nov 2016 in reply to Shady Link to this post

    Found the problem:

    1) Paging was not working fine because i had below line. After removing it, the page does not reload everytime i change page.

    <PagerStyle Mode="NextPrevNumericAndAdvanced" EnableSEOPaging="True" PageSizes="10;20;50;100" SEOPagingQueryStringKey="page" />

     

    2) Grouping does not work well (cannot expand and collapse groups). After reading article below, I understood that I should use the "NeedDataSourceEvent" when using server side binding.

    http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/data-binding/understanding-data-binding/server-side-binding/advanced-data-binding-(using-needdatasource-event) 

    The telerik controls are really well built, a developer just needs to familiarize themselves with them and read the docs.

  4. Answer
    Eyup
    Admin
    Eyup avatar
    3296 posts

    Posted 25 Nov 2016 Link to this post

    Hello Shady,

    Thank you for the nice feedback and I'm glad you've managed to find a viable solution to your specific scenario.

    Let me summarize by providing additional info:

    Binding:

    Please make sure that you are not using the DataBind() method to bind the grid. Performing complex grid operations such as Inserting, Deleting, Updating, Hierarchy relations, Grouping, Exporting, Paging, Sorting, Filtering, etc. require accommodating appropriate database operations.  Therefore, we suggest you to avoid Simple Databinding and strongly recommend the use of more advanced databinding methods, which automatically handle the aforementioned functions:

    Declarative DataSource (DataSourceID property)
    Programmatic Data Binding (NeedDataSource event, + DetailTableDataBind for hierarchy). You should set the DataSource property ONLY within these event handler.

    AJAX:

    Bear in mind that using RadAjaxPanel simultaneously with RadAjaxManager or UpdatePanel ( or implementing multiple wrapped RadAjaxPanels ) is not a supported scenario and we highly recommend to avoid such implementation. Please replace the RadAjaxPanel with regular asp:Panel or remove the RadAjaxManager:
    http://www.telerik.com/help/aspnet-ajax/ajax-controls-in-ajaxpanel-and-ajaxsettings.html


    Also, when developing your applications, temporarily disable any AJAX on the page if present (RadAjaxManager, RadAjaxPanel, UpdatePanel, etc.) and enable your script debugger (FireBug or F12) to see whether there are any script or server errors interfering, and make sure that the application works without AJAX.


    Regards,
    Eyup
    Telerik by Progress
    Telerik UI for ASP.NET AJAX is ready for Visual Studio 2017 RC! Learn more.
Back to Top