开发者

CurrentPageText changed by using C# code in RadDataPager

I want to chance CurrentPageText text property by using c# code. i am using

<telerik:RadDataPager ID="RadDataPager3" runat="server" PagedControlID="RadListView1"
                                            PageSize="9" Skin="">
                                            <Fields>
                                                <telerik:RadDataPagerGoToPageField CurrentPageText="Page:"
                                                    TotalPageText="of" SubmitButtonText="Go" TextBoxWidth="15" />
                                            </Fields>
                                开发者_开发问答        </telerik:RadDataPager>

code and now i want to change text of CurrentPageText, TotalPageText and SubmitButtonText by using C# code.

It can be feasible or not?

Thanks...


ell in this case you run into a unique sort of problem. The "Fields" located within the RadDataPager do not seem to have any ID to them, meaning you cannot reference them directly. You can, however, still modify their properties, but must be creative when doing so, because you must use code that may have unwanted affects on your controls:

If you are only using one "RadDataPagerGoToPageField" you may do something such as:

foreach (RadDataPagerGoToPageField thevar in RadDataPager3.Fields)
{
    thevar.CurrentPageText = "New Text";
    thevar.TotalPageText = "New Text2";
    thevar.SubmitButtonText = "New Text3";
}

Or if you need to get picky, you can add conditionals (if statements) to check the current properties of a given "RadDataPagerGoToPageField" and modify accordingly.

if(thevar.CurrentPageText == "Some sort of unique value")
{
   thevar.CurrentPageText == "Something new"
}

I'm sure you get the idea.

Hope that helps.

-J

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜