This is a migrated thread and some comments may be shown as answers.

radgrid inside microsoft ajax tab container

1 Answer 55 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Erwin Floresca
Top achievements
Rank 1
Erwin Floresca asked on 18 Nov 2010, 12:11 AM
Hi,

I am using a microsoft ajax tab container to display the tabs. I have six tabs inside that container. In each tab, I have a radgrid. The columns for the radgrid are built dynamically. I am loading the data for all the grids during page load. I have a javascript function to adjust the grid height and width. I included this javascript function in the gridcreated event. So, when the tab loads the grid is firing that javascript. But I am not able to get the mastertableview height. The height is returned as zero. I tried using the page_init event to load the grids but it still has the same problem (the height is returned as zero). Is there something that I am missing?

function AutoSize(sender, args)
{
       var dataHeight = sender.get_masterTableView().get_element().clientHeight;
}

1 Answer, 1 is accepted

Sort by
0
Radoslav
Telerik team
answered on 24 Nov 2010, 08:45 AM
Hello Erwin,

Could you please try using the offsetHeight instead of clientHeight and let me know if the issue still persists:
function AutoSize(sender, args)
{
   var dataHeight = sender.get_masterTableView().get_element().offsetHeight;
}

Additionally if the offsetHeight is also zero, could you please try getting the clientHeight with the following code snippet:
function AutoSize(sender, args)
{
       var dataHeight;
       setTimeout(function(){
           dataHeight = sender.get_masterTableView().get_element().clientHeight;
       }, 300);
}

Looking forward for your reply.

Kind regards,
Radoslav
the Telerik team
Browse the vast support resources we have to jumpstart 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.
Tags
Grid
Asked by
Erwin Floresca
Top achievements
Rank 1
Answers by
Radoslav
Telerik team
Share this question
or