To access page row on client

3 posts, 0 answers
  1. Jane Mathew
    Jane  Mathew avatar
    2 posts
    Member since:
    Mar 2010

    Posted 10 Mar 2010 Link to this post


    I'm not an expert with Telerik controls and am stuck with this. I need to somehow access the page row for a RadGrid from client side. Is this even possible?

    TIA for any help!
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 11 Mar 2010 Link to this post

    Hello Jane,

    I tried following approach in order to access the pager item from client side:

    Pass the ClientID of pager combobox from server code and save in a HiddenField control. From client event handler access the HiddenField and get the combo client object. Then using the parentNode property, get access to pager item. Here is the code that I tried.


        protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)  
            if (e.Item is GridPagerItem)  
                RadComboBox combo = (RadComboBox)(e.Item as GridPagerItem).FindControl("PageSizeComboBox");  
                HiddenField1.Value = combo.ClientID;  


        function getPager() {  
            var hf = document.getElementById("HiddenField1");  
            var combo = document.getElementById(hf.value);  
            var pager = combo.parentNode.parentNode.parentNode;  
   = "Red";  


  3. Valery
    Valery avatar
    45 posts
    Member since:
    Nov 2008

    Posted 11 Mar 2010 Link to this post

    The following function looks for a row containing the "rgPager" class in the footer of the grid:
    function GetGridPagerRow(gridClientId) { 
        var grid = $find(gridClientId); 
        var masterTableView = grid.get_masterTableView(); 
        var footerRows = masterTableView.get_element().tFoot.rows; 
        for (var i = 0; i < footerRows.length; i++) { 
            var row = footerRows[i]; 
            if (Sys.UI.DomElement.containsCssClass(row, 'rgPager')) { 
                return row; 
        return null

    Hope it helps,
Back to Top