ListView RadDatapager Skin in server side!

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

    Posted 01 Nov 2010 Link to this post

    Hello,
    I am using RadDatapager with RadListview in my website. I need to asgin RadDatapager skin in server side. Is it possible to asgin skin in server side . if possible, How can i do this?

    Thanks
    Nahid
  2. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 01 Nov 2010 Link to this post

    Hello Nahid,

    You can try setting the Skin for the RadDataPager on Page_Load or on RadListView PreRender event for instance. Please refer to this artile for more information on how to find the RadDatapager in the RadlistView controls collection.

    I hope this helps.

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

    Posted 02 Nov 2010 Link to this post

    Hello Lana,
    I need RadDatapager in page_load event.


    Thanks
    Nahid
  5. Answer
    Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 02 Nov 2010 Link to this post

    Hi Nahid,

    If you want to access the RadDataPager on Page_Load, you will need to rebind the listview first:

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            RadListView1.Rebind();
            RadDataPager pager = RadListView1.FindControl("RadDatapager1") as RadDataPager;
            pager.Skin = "Vista";
        }
    }


    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
  6. Nahid
    Nahid avatar
    31 posts
    Member since:
    Aug 2010

    Posted 11 Dec 2010 Link to this post

    Hello Lana,
    Thanks for your reply and its work fine. I have another problem. I have 2 "RadDataPagerTemplatePageField" (2 Image Button, "imbContactAdd" and "imbContactDelete"). How can I change the button image in server side (C#) or CSS ?

    Here is the code:

    <telerik:RadDataPager ID="rdpContactSummary" runat="server" PagedControlID="rlstvContactSummary" PageSize="9" Width="979px" CssClass="rdpContactSummary"  Enabled="true">
    <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="imbContactAdd" runat="server" 
    Height="22px" Width="22px" 
    ImageUrl="~/Images/PeopleAddBtn.png"
    OnClick="imbContactAdd_Click" ToolTip="Add New Contact" />
        
    <asp:ImageButton ID="imbContactDelete" runat="server" 
    Width="22px" Height="22px"
    ImageUrl="~/Images/PeopleDeleteBtn.png" O
    nClientClick="return 
    blockConfirm('Are you sure to Delete Contacts?', event, 330, 100,'','Confirm to Delete!');"
    OnClick="imbContactDelete_Click" 
    ToolTip="Delete Contact" />
    </PagerTemplate>
                                                            </telerik:RadDataPagerTemplatePageField>
    </Fields>
    </telerik:RadDataPager>


    Thanks
    Nahid
  7. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 15 Dec 2010 Link to this post

    Hello Nahid,

    You can try using the RadDataPager1.FIndControl() method for find the desired images on the server. Or try handling the FieldCreated server-side event and there call the FindControl() method for the particular field.

    Best wishes,
    Iana
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  8. Nahid
    Nahid avatar
    31 posts
    Member since:
    Aug 2010

    Posted 18 Dec 2010 Link to this post

    Hello Lana,
    Thanks for your relpy. I found my solution.

     

    RadDataPager datapager = (RadDataPager)rlstvContactSummary.FindControl("rdpContactSummary");
      
    System.Web.UI.WebControls.ImageButton imbAdd = (System.Web.UI.WebControls.ImageButton)datapager.Controls[4].FindControl("imbContactAdd");

    Thanks
    Nahid
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017