Disable RadGrid Pager Buttons

1 posts, 0 answers
  1. Charles
    Charles avatar
    1 posts
    Member since:
    Aug 2017

    Posted 17 Aug 2017 Link to this post

    I had a simple question that I can't seem to find the answer to. On my RadGrid I am using a pager and I want the First/Last/Next/Previous buttons to disable dynamically depending on if they are on the first page or last page. I don't want to disappear, but just get disabled. I have attempted this chunk of code down below:


     if (e.Item is GridPagerItem)
                    GridPagerItem pagerItem = (GridPagerItem)e.Item;
                    if (pagerItem.Paging.IsFirstPage)
                        pagerItem.CssClass = "RadFirstPage";
                        ((Button)pagerItem.FindControl("ctl03")).Enabled = false;
                    else if (pagerItem.Paging.IsLastPage)
                        pagerItem.CssClass = "RadLastPage";


    but the button still is able to be clicked on and hovered over. I want it to be completely disabled and without any hover action. Any ideas/suggestions/solutions/alcohol?

Back to Top