Dynamic Scroll Height

2 posts, 0 answers
  1. Fenil
    Fenil avatar
    1 posts
    Member since:
    Oct 2013

    Posted 10 Apr 2014 Link to this post

    I  have a common aspx page.
    I have one "Rad Tab" control in which we are loading the diffrent usercontrol dynamically as a content of the each tab control.
    Each user control having "Rad Grid" in it, and grid has static header and scoll area.
    I want to set the  the scroll area height of grid as per user desktop height.
    I tried with setting up scroll area height dynamically in "Grid Created" event. Its working but when I move from one tab to another the previous tab grid height get reser to its default height.
    If anyone has came across such issue let me know.

  2. Pavlina
    Pavlina avatar
    6069 posts

    Posted 14 Apr 2014 Link to this post

    Hi Fenil,

    Your problem is most probably caused by the fact that RadGrid cannot adjust its layout properly when it is placed inside an invisible container on the page (this is needed when using static headers). In order to prevent this behavior you can try to obtain a reference to the RadGrid client object once its container is visible (e.g. subscribe to RadTabStrip's OnClientTabSelected) and call the repaint() method of the grid as shown below.
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"
            <script type="text/javascript">
                function ClientTabSelected(sender, eventArgs) {
                    var radgrid = $find('<%= RadGrid1.ClientID %>');

    Give this suggestion a try and see if it works for you.


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top