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

RadGrid renders different in IE7, IE8 and IE8 Compatibility Mode

2 Answers 135 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Randall
Top achievements
Rank 2
Randall asked on 07 Sep 2010, 04:20 PM
Hello,

I am using RadControls for ASP.NET AJAX (v20091.527.20) and I am experiencing different display rendering in IE8 and IE8 Compatibility Mode.  Please see the attached screen shot.

As you can see, the columns widths are different depending on the browser mode.  I have also tried using IE7 but it renderes the same as IE8 Compatibility Mode.

Also, I have three custom filtering columns based on the GridTemplateColumn class.  The second one is set to stretch over five adjacent columns.  You can see it works fine in IE8 but gets clipped in IE8 Compatibility Mode (and also in IE7).

How can I fix this display issue?

Thanks,

Randall Price
Virginia Tech - Microsoft Implementation Group

2 Answers, 1 is accepted

Sort by
0
Accepted
Dimo
Telerik team
answered on 07 Sep 2010, 04:42 PM
Hello Randall,

IE6 and IE7 display table columns with a larger width, compared to all other browsers - this is because they expand the columns by the amounf of side cell paddings. This problem can be workarounded by removing the paddings, but this will greatly reduce readability, so we don't recommend doing this.

As for the RadComboBox being clipped - actually this is the expected behavior and the control is fixed to clip overflowing content in all browsers in the latest versions. What I can suggest you to do is hide selected cells from the RadGrid filtering item (set Visible="false" for them) and set an appropriate ColSpan attribute to the table cell, which contains the RadComboBox. Do these customizations in the ItemCreated event handler. You can obtain reference to the table cells by using the respective columns' UniqueIDs.

http://www.telerik.com/help/aspnet-ajax/grdaccessingcellsandrows.html

Kind regards,
Dimo
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Randall
Top achievements
Rank 2
answered on 07 Sep 2010, 09:33 PM
Hello Dimo,

Thanks for your quick response to my display issue.

Your suggestion works perfectly!  See the attached screenshot of the working solution.  I used the following code to fix this display issue:

protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
{
    if (e.Item is GridFilteringItem)
    {
        GridFilteringItem oGridFilteringItem = (GridFilteringItem)e.Item;
  
        // Hide the filtering item GridTableCell for these columns.
        ((oGridFilteringItem)["CountNeeded"]    as GridTableCell).Visible = false;
        ((oGridFilteringItem)["CountNotNeeded"] as GridTableCell).Visible = false;
        ((oGridFilteringItem)["CountFailed"]    as GridTableCell).Visible = false;
        ((oGridFilteringItem)["CountUnknown"]   as GridTableCell).Visible = false;
  
        // Set this filtering item to span 5 columns.
        ((GridTableCell)oGridFilteringItem["CountInstalled"] as GridTableCell).ColumnSpan = 5;
    }
}

I have the width of the RadComboBox (in the column that spans 5 columns) set to 100% and it stretches across the 5 columns just fine now.

Thanks,

Randall Price
Virginia Tech - Microsoft Implementation Group


Tags
Grid
Asked by
Randall
Top achievements
Rank 2
Answers by
Dimo
Telerik team
Randall
Top achievements
Rank 2
Share this question
or