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

Rows and column alignment problem

12 Answers 294 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
Morten
Top achievements
Rank 2
Iron
Iron
Veteran
Morten asked on 01 May 2013, 11:20 PM

Hi,

I have a pivot grid where some of the fields holds "long" texts. Sometimes the “rows” in the grids are not aligned correctly with the “column rows” – especially when the text wraps. I tried my example in a completely empty project on a page having only the pivot grid but the problem does not go away (no CSS or other layout applied).

(IE9)

12 Answers, 1 is accepted

Sort by
0
Vasil
Telerik team
answered on 06 May 2013, 01:38 PM
Hello Morten,

The RadPivotGrid use JavaScript to align the row heights between the rows in it's tables. If the JavaScript in your browser is turned off or if there is JavaScript error in your page, the align will not happen.
Please confirm that the script debugging is enabled in your browser and that you don't get any exception.
You can also try to execute the function that aligns the rows in the console of your browser and see if it's get corrected:
$find("Client Id of Your RadPivotGrid")._adjustRowsLayout()


Kind regards,
Vasil
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Barbaros Saglamtimur
Top achievements
Rank 1
answered on 06 May 2013, 03:10 PM
I have same problem on IE9. FireFox runs fine.
_adjustRowsLayout() did nothing.
0
Brian
Top achievements
Rank 1
answered on 06 May 2013, 03:33 PM
I also have this issue, though for me it correctly aligns after expanding a row.

initially it is badly misaligned, the first row will be almost all the way up to the column headers. as soon as I expand any row and collapse it corrects itself and everything looks great.
0
Vasil
Telerik team
answered on 07 May 2013, 07:18 AM
Hello,

We had this issue in our previous version, but it is already fixed and it is working fine in our demos (which are using the latest version).  Could you tell us what version of the controls you are using? And if it is the latest one, please try to prepare a sample runnable project that we can test here and investigate further.

Greetings,
Vasil
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Barbaros Saglamtimur
Top achievements
Rank 1
answered on 07 May 2013, 08:16 AM
2013.1.417.40 over here.
0
Vasil
Telerik team
answered on 07 May 2013, 08:18 AM
Hi Barbaros,

Could you send us sample that we can run here, or if you have your page online, to give us a link?

All the best,
Vasil
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Morten
Top achievements
Rank 2
Iron
Iron
Veteran
answered on 08 May 2013, 12:05 PM

Unfortunately we dont have an online demo showing the problem. But the problem happens if you have many PivotGridRowFields (eg. 5), if they wrap the text inside and if you show a sub total for each PivotGridRowFields.

I tried to run the Javascript function _adjustRowsLayout() but it doesn’t solve the problem. The function runs without any errors (JS debugging enabled etc.).

(Telerik.web.ui version 2013.1.417.40)

0
Vasil
Telerik team
answered on 13 May 2013, 12:16 PM
Hi Morten,

We tested the RadPivotGrid in various scenarios when the data is in several rows and it aligns correct every time. I am not sure what else we can do here. If you can provide some additional information that you think it might help in replicating the problem, it might help to resolve it. Will be glad to here all your findings about the subject.

Regards,
Vasil
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Barbaros Saglamtimur
Top achievements
Rank 1
answered on 15 May 2013, 06:38 AM
I have found my problem. It happens when I have templated pivotgridrowfield with its width is 0px.
0
Luke
Top achievements
Rank 2
answered on 17 Oct 2014, 12:25 AM
I was seeing this issue with certain data using the latest Telerik DLLs as of October 2014, and found that sorting any column would cause the row alignment to be corrected, so I implemented this fix:

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
  <script type="text/javascript">
 
    // Sometimes the pivot grid row becomes misaligned with the other rows, but lines up after applying a sort.
    // This will force a sort on page load (but in default sort order so the action isn't apparent) to fix the problem.
    $(document).ready(function () {
      var pivotGrid = $find('<%= RadPivotGrid1.ClientID %>');
      pivotGrid.fireCommand("Sort", "");
    });
 
  </script>
</telerik:RadCodeBlock>
0
Jérome
Top achievements
Rank 1
answered on 18 Feb 2015, 04:07 PM
Hi,

I encounter the same issue.

could you tell me where the radscripblock has to be placed in the page or what I have to add because when I try to add the block in my page, I get a javascript exception when I load the page

thanks in advance

0
Vasil
Telerik team
answered on 19 Feb 2015, 09:17 AM
Hello Jérome,

$(document).ready is not reliable way to execute JavaScript when you need controls to be created, because it will depend on how fast is the browser engine and how items there are on the page.

Use the pageLoad of the Asp.Net Ajax Framework instead.

function pageLoad()
{
   //this code will be executed after the controls are created
   var pivotGrid = $find('<%= RadPivotGrid1.ClientID %>');
   pivotGrid.fireCommand("Sort", "");
}


Regards,
Vasil
Telerik
 

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.

 
Tags
PivotGrid
Asked by
Morten
Top achievements
Rank 2
Iron
Iron
Veteran
Answers by
Vasil
Telerik team
Barbaros Saglamtimur
Top achievements
Rank 1
Brian
Top achievements
Rank 1
Morten
Top achievements
Rank 2
Iron
Iron
Veteran
Luke
Top achievements
Rank 2
Jérome
Top achievements
Rank 1
Share this question
or