RadDataPager Recognizing returns null in some conditions

3 posts, 0 answers
  1. Majid Darab
    Majid Darab avatar
    112 posts
    Member since:
    Dec 2009

    Posted 19 May 2011 Link to this post

    hi my dear friends :
    i have a radcombobox that is in relationship with RadListViw (with RadDataPager Inside)...
    when i change the item of rad combobox , so RadListView is Updated... -> selectedIndexxhanged()  server-side event...
    my selectedIndexChanged() is like this :
    protected void RadcbImagesGroup_SelectedIndexChanged(object sender, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e)
        var raddatapager = (rlvImages).FindControl("RadDataPager1") as RadDataPager;
        if (raddatapager != null)

    my radComboBox Item values is like : 1,2,3...

    in mode 1 we have 25 pages...
    in mode 2 we have 5 pages...
    in mode 3 we have 5 pages...

    my problem is when we are in mode 1 and put the pageNumber to more than 5 and when  i change the combobox Item to mode 2 so
    var raddatapager = (rlvImages).FindControl(
    "RadDataPager1") as RadDataPager;
    is null...

    but if we put the page# (we are in mode 1) to lower than 5 or equal 5 , and change the radcb item to another everything works fine...

    where is the null problem?

    thanks for advance
  2. Majid Darab
    Majid Darab avatar
    112 posts
    Member since:
    Dec 2009

    Posted 19 May 2011 Link to this post

    hi dear telerik team !
    it seems other people have this null problem too!

    would you plz let us to know what is the problem!
  3. Veli
    Veli avatar
    2002 posts

    Posted 20 May 2011 Link to this post

    Hi Majid,

    The code you provided does not give us any clues as to what might be causing this issue. The only thing we notices is that you are manually databinding RadListView by calling DataBind(). With paging enabled, we recommend using Advanced RadListView DataBinding using the NeedDataSource event. If this issue persists, consider sending us some sample code related to RadListView's and RadComboBox's definition, so that we can have a better idea of your exact scenario.

    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.

Back to Top