RadDataPager not event not work in first click!

7 posts, 1 answers
  1. Nahid
    Nahid avatar
    31 posts
    Member since:
    Aug 2010

    Posted 03 Sep 2010 Link to this post

    Hello ,
    I am working on telerik ListView with RadDatapager . RadDatapager event is not (fire) working on first click. Event working on second click. I send my code below:

    <%@ Page Language="C#" ValidateRequest="false" EnableEventValidation="false" CodeBehind="UIPeople.aspx.cs"
        Inherits="myDoxii_WebRole.UIPeople" %>
      
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <head runat="server">
        <title></title>
        <link href="App_Themes/CustomTabStrip/TabStrip.CustomTabStrip.css" rel="stylesheet"
            type="text/css" />
        <link href="StyleSheet/MainStylesheet.css" rel="stylesheet" type="text/css" />
        <link href="App_Themes/ForestBlack/TabStrip.ForestBlack.css" rel="stylesheet" type="text/css" />
        <link href="App_Themes/CustomTabStripOffice2007/TabStrip.CustomTabStripOffice2007.css"
            rel="stylesheet" type="text/css" />
    </head>
    <body style="background-color: Transparent;">
        <form id="form1" method="post" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="ListViewPanel1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="ListViewPanel1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <%--<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel2" runat="server" MinDisplayTime="0" />--%>
        <%-- <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        </asp:UpdatePanel>--%>
        <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" Skin="Black" EnableRoundedCorners="true" />
        <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="100%" Width="100%"
            HorizontalAlign="NotSet" LoadingPanelID="RadAjaxLoadingPanel1">
            <div class="MainContent">
                <%-- <div id="ContactHeaderImage">
                  
                <div id="ContactHeaderImageMiddle">
                    <asp:Label ID="lblContactHeader" runat="server" Text="Contact" CssClass="cssContentHeader"></asp:Label>
                </div>
                <div id="ContactHeaderImageSearch">
                      
                </div>
            </div>--%>
                <div id="Contact_ListsMain">
                    <fieldset class="flsContactListAll" style="float: left; width: 980px; min-height: 60px;
                        padding-bottom: 0px; padding-left: 7px; border: 0px;">
                        <telerik:RadTabStrip ID="RadTabStripContactList" runat="server" SelectedIndex="13"
                            Skin="CustomTabStripOffice2007" EnableEmbeddedSkins="False" Width="980px" Font-Size="10pt"
                            OnTabClick="RadTabStripContactList_TabClick">
                            <Tabs>
                                <telerik:RadTab runat="server" Text="ALL" Width="65.3px" Selected="True">
                                </telerik:RadTab>
                                <telerik:RadTab runat="server" Text="A-B" Width="65.3px">
                                </telerik:RadTab>
                                <telerik:RadTab runat="server" Text="C-D" Width="65.3px">
                                </telerik:RadTab>
                                <telerik:RadTab runat="server" Text="E-F" Width="65.3px">
                                </telerik:RadTab>
                                <telerik:RadTab runat="server" Text="G-H" Width="65.3px">
                                </telerik:RadTab>
                                <telerik:RadTab runat="server" Text="I-J" Width="65.3px">
                                </telerik:RadTab>
                                <telerik:RadTab runat="server" Text="K-L" Width="65.3px">
                                </telerik:RadTab>
                                <telerik:RadTab runat="server" Text="M-N" Width="65.3px">
                                </telerik:RadTab>
                                <telerik:RadTab runat="server" Text="O-P" Width="65.3px">
                                </telerik:RadTab>
                                <telerik:RadTab runat="server" Text="Q-R" Width="65.3px">
                                </telerik:RadTab>
                                <telerik:RadTab runat="server" Text="S-T" Width="65.3px">
                                </telerik:RadTab>
                                <telerik:RadTab runat="server" Text="U-V" Width="65.3px">
                                </telerik:RadTab>
                                <telerik:RadTab runat="server" Text="W-X" Width="65.3px">
                                </telerik:RadTab>
                                <telerik:RadTab runat="server" Text="Y-Z" Width="65.3px">
                                </telerik:RadTab>
                                <telerik:RadTab runat="server" Text="#" Width="65.3px">
                                </telerik:RadTab>
                            </Tabs>
                        </telerik:RadTabStrip>
                        <div class="ContactListView">
                            <asp:Panel ID="ListViewPanel1" runat="server">
                                <telerik:RadListView ID="rlstvContactSummary" runat="server" ItemPlaceholderID="ListViewContainer"
                                    AllowPaging="True" PageSize="9" Skin="Black" OnSelectedIndexChanged="rlstvContactSummary_SelectedIndexChanged"
                                    DataKeyNames="Contact_ID">
                                    <LayoutTemplate>
                                        <asp:Panel ID="ListViewContainer" runat="server" />
                                        <table cellpadding="0" cellspacing="0" width="980px;" style="float: left; margin-left: -1px;
                                            margin-top: 8px; background-color: #FFFFFF;">
                                            <tr>
                                                <td>
                                                    <telerik:RadDataPager ID="rdpContactSummary" runat="server" PagedControlID="rlstvContactSummary"
                                                        PageSize="9" Skin="Black" Width="979px" CssClass="rdpContactSummary">
                                                        <Fields>
                                                            <telerik:RadDataPagerButtonField FieldType="FirstPrev" />
                                                            <telerik:RadDataPagerButtonField FieldType="Numeric" />
                                                            <telerik:RadDataPagerButtonField FieldType="NextLast" />
                                                            <telerik:RadDataPagerGoToPageField CurrentPageText="<%$ Resources:LanguageResource, rPage%>"
                                                                TotalPageText="<%$ Resources:LanguageResource, rOf%>" SubmitButtonText="<%$ Resources:LanguageResource, rGo%>"
                                                                TextBoxWidth="15" />
                                                            <telerik:RadDataPagerTemplatePageField>
                                                                <PagerTemplate>
                                                                    <asp:ImageButton ID="ContactAdd" runat="server" Height="22px" Width="22px" ImageUrl="~/Images/PeopleAddBtn.png" />
                                                                      <asp:ImageButton ID="ContactDelete" runat="server" Width="22px" Height="22px"
                                                                        ImageUrl="~/Images/PeopleDeleteBtn.png" />
                                                                </PagerTemplate>
                                                            </telerik:RadDataPagerTemplatePageField>
                                                        </Fields>
                                                    </telerik:RadDataPager>
                                                </td>
                                            </tr>
                                        </table>
                                    </LayoutTemplate>
                                    <ItemTemplate>
                                        <fieldset class="flsContactList">
                                            <div class="ContactListItem">
                                                <div class="ContactListPhoto" style="width: 50px; height: 50px; float: left;">
                                                    <%--<telerik:RadBinaryImage runat="server" ID="RadBinaryImage1" DataValue='<%#Eval("[Contact_Image]") %>'
                                            AutoAdjustImageControlSize="false" Width="50px" Height="50px" ToolTip='<%#Eval("[Contact_Image]", "Photo of {0}") %>'
                                            AlternateText='<%#Eval("Contact_Image", "Photo of {0}") %>' />--%>
                                                    <img alt="test Image" longdesc="Images/image.png" src="Images/User.png" style="width: 45px;
                                                        height: 45px" />
                                                </div>
                                                <div class="ContactListData" style="float: left; height: 50px; width: 100px; padding-left: 5px;">
                                                    <asp:LinkButton ID="LinkButton1" runat="server" CommandName="Select" CssClass="btnLink">
                                                        <%--<label>
                                                    </label>--%>
                                                        <asp:Label ID="Label1" runat="server" Visible="false" Text='<%# Bind("[Contact_ID]")%>'></asp:Label><%#Eval("[First_Name]")%><br />
                                                        <%-- <label>
                                                    </label>--%>
                                                        <%#Eval("[Address]")%><br />
                                                        <%#Eval("[Phone_Number]")%>
                                                    </asp:LinkButton>
                                                </div>
                                                <div class="ContactListChk" style="float: right;">
                                                    <asp:CheckBox ID="chkContactList" runat="server" />
                                                </div>
                                            </div>
                                        </fieldset>
                                    </ItemTemplate>
                                </telerik:RadListView>
                            </asp:Panel>
                        </div>
                    </fieldset>
                </div>
                <div id="ContactDetails">
                    <div id="ContactDetailsTab">
                        <fieldset class="flsContactDetails" style="float: left; width: 980px; min-height: 400px;
                            margin-left: 3px; padding-left: 7px; padding-top: 5px; padding-bottom: 5px; border: 0px;">
                            <telerik:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="RadMultiPage1"
                                UnSelectChildren="True" Skin="CustomTabStripOffice2007" EnableEmbeddedSkins="false"
                                ClickSelectedTab="True" AutoPostBack="True" SelectedIndex="0" Font-Size="10pt"
                                Width="980px">
                                <Tabs>
                                    <telerik:RadTab runat="server" Text="<%$ Resources:LanguageResource, rDetails%>"
                                        Width="120px" PageViewID="RadPageView1" Selected="True">
                                    </telerik:RadTab>
                                    <telerik:RadTab runat="server" Text="<%$ Resources:LanguageResource, rSecurity%>"
                                        Width="120px" PageViewID="RadPageView2">
                                    </telerik:RadTab>
                                    <telerik:RadTab runat="server" Text="<%$ Resources:LanguageResource, rUsage%>" Width="120px"
                                        PageViewID="RadPageView3">
                                    </telerik:RadTab>
                                </Tabs>
                            </telerik:RadTabStrip>
                            <telerik:RadMultiPage ID="RadMultiPage1" CssClass="rpvContactDetails" runat="server"
                                SelectedIndex="0" Width="980px" Height="100%">
                                <telerik:RadPageView ID="RadPageView1" runat="server">
                                    <%--<asp:Button ID="btnEdit" runat="server" Text="Edit" CssClass="btnEdit" SkinID="Black" 
                                    OnClick="btnEdit_Click" Height="22px" />--%>
                                    <div id="ContactDetailsData">
                                        <fieldset class="fsContactSubDetails">
                                            <div style="float: right; padding-right: 30px;">
                                                <asp:Button ID="btnEdit" runat="server" Text="Edit" CssClass="cssButton_Black" OnClick="btnEdit_Click"
                                                    Height="22px" />
                                            </div>
                                            <div id="ContactMasterInfo">
                                                <div id="ContactMasterInfoLeft" style="width: 475px; float: left">
                                                    <div id="Image" style="width: 60px; height: 60px; float: left">
                                                        <asp:Image ID="imgContactDetails" runat="server" ImageUrl="Images/User.png" Width="50px"
                                                            Height="50px" />
                                                        <%--<telerik:RadListView ID="rdContactImage" runat="server" Width="50px" Height="50px">
                                                        <itemtemplate>
                                                            <telerik:RadBinaryImage runat="server" ID="rdbiContactImage" DataValue='<%#Eval("[Contact_Image]") %>'
                                                                AutoAdjustImageControlSize="false" Width="50px" Height="50px" ToolTip='<%#Eval("[Contact_Image]", "Photo of {0}") %>'
                                                                AlternateText='<%#Eval("Contact_Image", "Photo of {0}") %>' />
                                                        </itemtemplate>
                                                    </telerik:RadListView>--%>
                                                    </div>
                                                    <ul>
                                                        <li><strong>
                                                            <asp:Label ID="lblFirstName" runat="server"></asp:Label>
                                                            <asp:Label ID="lblLastName" runat="server"></asp:Label>
                                                        </strong></li>
                                                        <li>
                                                            <asp:Label ID="lblCompanyName" runat="server"></asp:Label>
                                                        </li>
                                                        <li>
                                                            <asp:Label ID="lblJobTitle" runat="server"></asp:Label>
                                                        </li>
                                                    </ul>
                                                </div>
                                                <div id="ContactMasterInfoRight" style="width: 475px; float: left">
                                                    <ul>
                                                        <li>
                                                            <asp:Label ID="lblTitleUserID" runat="server" CssClass="cssLabelTitle" Text="User ID: "></asp:Label>
                                                            <asp:Label ID="lblUserID" runat="server"></asp:Label>
                                                        </li>
                                                        <li>
                                                            <asp:Label ID="lblTitleUserType" runat="server" CssClass="cssLabelTitle" Text="User Type: "></asp:Label>
                                                            <asp:Label ID="lblUserType" runat="server"></asp:Label>
                                                        </li>
                                                    </ul>
                                                </div>
                                            </div>
                                        </fieldset>
                                        <fieldset class="fsContactSubDetails">
                                            <div id="ContactPersonalsInfo" style="width: 950px; float: left">
                                                <div id="ContactPersonalsInfoLeft" style="width: 475px; float: left;">
                                                    <ul>
                                                        <li>
                                                            <asp:Label ID="lblTitleJobTitle" runat="server" CssClass="cssLabelTitle" Text="Job Title: "></asp:Label>
                                                            <asp:Label ID="lblJobTitle1" runat="server" Text=""></asp:Label>
                                                        </li>
                                                        <li>
                                                            <asp:Label ID="lblTitleAssistant" runat="server" CssClass="cssLabelTitle" Text=" Assistant:"></asp:Label>
                                                            <asp:Label ID="lblAssistant" runat="server" Text=""></asp:Label>
                                                        </li>
                                                    </ul>
                                                </div>
                                                <div id="ContactPersonalsInfoRight" style="width: 475px; float: left">
                                                    <ul>
                                                        <li>
                                                            <asp:Label ID="lblTitleBirthDay" runat="server" CssClass="cssLabelTitle" Text="Birth Day: "></asp:Label>
                                                            <asp:Label ID="lblBirthDay" runat="server" Text=""></asp:Label>
                                                        </li>
                                                        <li>
                                                            <asp:Label ID="lblTitleNickName" runat="server" CssClass="cssLabelTitle" Text="Nick Name: "></asp:Label>
                                                            <asp:Label ID="lblNickName" runat="server" Text=""></asp:Label>
                                                        </li>
                                                    </ul>
                                                </div>
                                            </div>
                                        </fieldset>
                                        <fieldset class="fsContactSubDetails">
                                            <div id="ContactWebAddressInfo">
                                                <div id="ContactWebAddressInfoLeft" style="width: 475px; float: left">
                                                    <ul>
                                                        <li>
                                                            <asp:Label ID="lblTitlePrimaryEmail" runat="server" CssClass="cssLabelTitle" Text="Primary Email: "></asp:Label>
                                                            <asp:HyperLink ID="hlPrimaryEmail" runat="server"></asp:HyperLink>
                                                            <%--<a id="mailtoPrimaryEmail"  href="mailto:" >
                                                    <asp:Label ID="lblPrimaryEmail" runat="server" Text=""></asp:Label>
                                                </a>--%>
                                                        </li>
                                                        <li>
                                                            <asp:Label ID="lblTitleBusinessEmail" runat="server" CssClass="cssLabelTitle" Text="Business Email: "></asp:Label>
                                                            <asp:HyperLink ID="hlBusinessEmail" runat="server"></asp:HyperLink>
                                                            <%--<a id="mailtoBusinessEmail" href="mailto:">
                                                    <asp:Label ID="lblBusinessEmail" runat="server" Text=""></asp:Label>
                                                </a>--%>
                                                        </li>
                                                    </ul>
                                                </div>
                                                <div id="ContactWebAddressInfoRight" style="width: 475px; float: left">
                                                    <ul>
                                                        <li>
                                                            <asp:Label ID="lblTitleWebSite" runat="server" CssClass="cssLabelTitle" Text="Web Site: "></asp:Label>
                                                            <%--//<asp:Label ID="lblWebSite" runat="server" Text=""></asp:Label>--%>
                                                            <asp:HyperLink ID="hlWebsite" runat="server" Target="_blank"> </asp:HyperLink>
                                                        </li>
                                                        <li>
                                                            <asp:Label ID="Label17" runat="server" Text=""></asp:Label>
                                                            <asp:Label ID="Label18" runat="server" Text=""></asp:Label>
                                                        </li>
                                                    </ul>
                                                </div>
                                            </div>
                                        </fieldset>
                                        <fieldset class="fsContactSubDetails">
                                            <div id="ContactAddressAndPhonesInfo" style="width: 950px; float: left">
                                                <div id="ContactAddressInfo" style="width: 475px; float: left">
                                                    <ul>
                                                        <asp:Label ID="lblTitleAddress1" runat="server" CssClass="cssLabelTitle" Text="Work: "></asp:Label>
                                                        <li>
                                                            <asp:Label ID="lblDescription1" runat="server" Text=""></asp:Label>
                                                        </li>
                                                        <li>
                                                            <asp:Label ID="lblStreetOne1" runat="server" Text=""></asp:Label>
                                                        </li>
                                                        <li>
                                                            <asp:Label ID="lblStreetTwo1" runat="server" Text=""></asp:Label>
                                                        </li>
                                                        <li>
                                                            <asp:Label ID="lblCity1" runat="server" Text=""></asp:Label>
                                                        </li>
                                                        <li>
                                                            <asp:Label ID="lblPostalCode1" runat="server" Text=""></asp:Label>
                                                        </li>
                                                    </ul>
                                                    <br />
                                                    <br />
                                                    <ul>
                                                        <asp:Label ID="lblTitleAddress2" runat="server" CssClass="cssLabelTitle" Text="Home: "></asp:Label>
                                                        <li>
                                                            <asp:Label ID="lblDescription2" runat="server" Text=""></asp:Label>
                                                        </li>
                                                        <li>
                                                            <asp:Label ID="lblStreetOne2" runat="server" Text=""></asp:Label>
                                                        </li>
                                                        <li>
                                                            <asp:Label ID="lblStreetTwo2" runat="server" Text=""></asp:Label>
                                                        </li>
                                                        <li>
                                                            <asp:Label ID="lblCity2" runat="server" Text=""></asp:Label>
                                                        </li>
                                                        <li>
                                                            <asp:Label ID="lblPostalCode2" runat="server" Text=""></asp:Label>
                                                        </li>
                                                    </ul>
                                                </div>
                                                <div id="ContactPhonesInfo" style="width: 475px; float: left">
                                                    <ul>
                                                        <li>
                                                            <asp:Label ID="lblTitleHomePhone" runat="server" CssClass="cssLabelTitle" Text="Home Phone: "></asp:Label>
                                                            <asp:Label ID="lblHomePhone" runat="server" Text=""></asp:Label>
                                                        </li>
                                                        <li>
                                                            <asp:Label ID="lblTitleWorkPhone" runat="server" CssClass="cssLabelTitle" Text="Work Phone: "></asp:Label>
                                                            <asp:Label ID="lblWorkPhone" runat="server" Text=""></asp:Label>
                                                        </li>
                                                        <li>
                                                            <asp:Label ID="lblTitleMobilePhone" runat="server" CssClass="cssLabelTitle" Text="Mobile Phone: "></asp:Label>
                                                            <asp:Label ID="lblMobilePhone" runat="server" Text=""></asp:Label>
                                                        </li>
                                                    </ul>
                                                </div>
                                            </div>
                                        </fieldset>
                                    </div>
                                </telerik:RadPageView>
                                <telerik:RadPageView ID="RadPageView2" runat="server">
                                </telerik:RadPageView>
                                <telerik:RadPageView ID="RadPageView3" runat="server">
                                </telerik:RadPageView>
                            </telerik:RadMultiPage>
                        </fieldset>
                        <%-- <%#Eval("[User_ID]")%>--%>
                    </div>
                </div>
            </div>
        </telerik:RadAjaxPanel>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Black">
        </telerik:RadAjaxLoadingPanel>
        </form>
    </body>
    </html>

    Please help me...
  2. Answer
    Rosen
    Admin
    Rosen avatar
    3234 posts

    Posted 07 Sep 2010 Link to this post

    Hi Nasir,

    Can you please verify that the RadListView control is not databound on every page load?

    All the best,
    Rosen
    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Nahid
    Nahid avatar
    31 posts
    Member since:
    Aug 2010

    Posted 15 Oct 2010 Link to this post

    Hi Rosen,

    Thanks for your replay. Its solved using NeedDataSource Method.

    Now I need a RadTabStrip with my RadListView by using serverside API Like attachted image. How can I solve this ??

    Thanks

    Md Nasir Uddin

  5. Nahid
    Nahid avatar
    31 posts
    Member since:
    Aug 2010

    Posted 15 Oct 2010 Link to this post

    Hi Rosen,

    The Image is bellow ...

  6. Dimo
    Admin
    Dimo avatar
    8331 posts

    Posted 20 Oct 2010 Link to this post

    Hi Nahid,

    The behavior that you want to achieve can be implemented by using filtering. Use the following demo as a starting point.

    http://demos.telerik.com/aspnet-ajax/listview/examples/filtering/defaultcs.aspx

    Each RadTabStrip tab will execute a specific filtering command to RadListView, while the first tab will clear the filter expression.

    Regards,
    Dimo
    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
  7. Rajesh
    Rajesh avatar
    1 posts
    Member since:
    Jul 2012

    Posted 18 Jul 2012 Link to this post

     

    Hi Rosen,

    I have a asp.net usercontrols which consists of Repeater, buttons, labels and a HTML pager which is made by anchor tags, so I want to replace older html pager with RadDataPager. But I could not find any property to set TotalRecords and currentPageindex.

    I seen StartRowindex , TotalRecords and CurrentPageIndex all are read only so I can't use RadDataPager to accomplish pagination in my usercontrol.

    I there any way to use RadDataPager with out Data-bound controls. 

    Thanks,
    Rajesh



  8. Radoslav
    Admin
    Radoslav avatar
    1564 posts

    Posted 23 Jul 2012 Link to this post

    Hello Rajesh,

    Please check out the following example which demonstrates how to use RadDataPager control without Data-bound controls:
    http://demos.telerik.com/aspnet-ajax/datapager/examples/raddatapagerintegration/defaultcs.aspx

    I hope this helps.

    Greetings,
    Radoslav
    the Telerik team
    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 their blog feed now.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017