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

ListView RadDatapager Skin in server side!

6 Answers 70 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Nahid
Top achievements
Rank 1
Nahid asked on 01 Nov 2010, 03:05 PM
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

6 Answers, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 01 Nov 2010, 04:21 PM
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
0
Nahid
Top achievements
Rank 1
answered on 02 Nov 2010, 01:16 PM
Hello Lana,
I need RadDatapager in page_load event.


Thanks
Nahid
0
Accepted
Iana Tsolova
Telerik team
answered on 02 Nov 2010, 03:36 PM
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
0
Nahid
Top achievements
Rank 1
answered on 11 Dec 2010, 01:21 PM
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
0
Iana Tsolova
Telerik team
answered on 15 Dec 2010, 12:24 PM
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.
0
Nahid
Top achievements
Rank 1
answered on 18 Dec 2010, 01:23 PM
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
Tags
ListView
Asked by
Nahid
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Nahid
Top achievements
Rank 1
Share this question
or