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

ExpandCollapseColumn settings ignored

9 Answers 159 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Thomas
Top achievements
Rank 1
Thomas asked on 20 Oct 2008, 07:47 PM
Has the bug mentioned in this post: http://www.telerik.com/community/forums/thread/b311D-babhha.aspx been fixed? Specifically, none of the settings on the ExpandCollapseColumn appear to have any effect.  For example:
<ExpandCollapseColumn HeaderText="Foo"
    <HeaderStyle Width="50px" HorizontalAlign="Center" /> 
    <ItemStyle Width="50px" HorizontalAlign="Center" /> 
</ExpandCollapseColumn> 

The above does nothing. The ExpandCollapse column's width is unchanged and the header text is not set in FF3.0, IE7 or Safari 3.12 for Windows. I realize I can set this is code behind using the ColumnCreated event. However, that is really a workaround for markup that should work.

9 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 22 Oct 2008, 08:07 AM
Hello Thomas,

Unfortunately we will not be able to include fix for this issue in the upcoming release. Please excuse us once again because of this problem!

Sincerely yours,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
ManniAT
Top achievements
Rank 2
answered on 30 Mar 2009, 05:34 PM

Hi,

although this is an old post - the things do not seem to be fixed.
And the problem now comes up with IE8 rendering.

If I set my page to "compatibility view" my grid looks OK.
But in IE8 view the header of the expand-collapse collumn has a very small width while the item (the expand / collapse button) is broader.
This breaks the whole layout.
And it can't be changed with markup like this:

            </DetailTables> 
            <ExpandCollapseColumn ItemStyle-Width="40px" HeaderStyle-Width="40px">  
            </ExpandCollapseColumn> 
 
            <Columns> 
                <telerik:GridEditCommandColumn UniqueName="MEditColumn" ButtonType="ImageButton"  Visible="false" ItemStyle-Width="30px" HeaderStyle-Width="30px" /> 
                <telerik:GridBoundColumn DataField="EmailStringsID" DataType="System.Int32" HeaderText="ID" ReadOnly="True" SortExpression="EmailStringsID" UniqueName="EmailStringsID" AllowFiltering="False" ItemStyle-Width="36px" HeaderStyle-Width="36px"/>  
 

The settings are still ignored!!

Regards

Manfred
0
ManniAT
Top achievements
Rank 2
answered on 30 Mar 2009, 05:50 PM
By the way,

handling the things in code behind works "somehow".
In other words - the column changes the width - but it is not the same for header / item.
I used this code:

        protected void rgEmailStrings_ColumnCreated(object sender, GridColumnCreatedEventArgs e) {  
            if (e.Column is GridExpandColumn) {  
                e.Column.HeaderStyle.Width = new Unit(60);  
                e.Column.ItemStyle.Width = new Unit(60);  
            }  
        }  
 
I know it is "wide" - but I did it just to see if something changes.

Works with Ie6, IE7, FF - but not with IE8.

Regards

Manfred
0
Pavel
Telerik team
answered on 01 Apr 2009, 08:02 AM
Hello Manfred,

Indeed our developers did not have time to address the problem and currently the only way to set the width of the autogenerated ExpandCollapse column is programatically.

I have tried to reproduce the problem you described in IE8 but the column seems to be resized as expected. See the attached screenshot for reference. Can you confirm you are using the official release version of the browser?  Let me know if I am missing something important.

Kind regards,
Pavel
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
ManniAT
Top achievements
Rank 2
answered on 06 Apr 2009, 10:00 AM
Hi,

although in the update notes I found
Fixed: Column headers are misaligned when scrolling with static headers is enabled under IE8 browserFixed: Column headers are misaligned when scrolling with static headers is enabled under IE8 browser
I still get the missalignement when not in compatibility mode:
http://wow.puzzle101.net/images/scrnocompa.jpg
If I set compatibility rendering via (what you also do in your samples :))
<meta http-equiv="X-UA-Compatible" content="IE=7" /> 
I get the correct
http://wow.puzzle101.net/images/scrcompa.jpg
So the use of static header still does not work for me.

IE8 is German Release.
RadControls are Design 2009.1.402.35 - UI 2009.1.311.35.
Maybe I had an update problem here (I used EXE installer) or there is a mismatch in versions.
On the other hand some problems are fixed with this version!!

Regards

Manfred
0
ManniAT
Top achievements
Rank 2
answered on 06 Apr 2009, 10:08 AM
STOP!!!!

Sorry this was an update issue.
I completely rechecked why I got this "wrong looking" version - fixed it and now I have
Version UI: 2009.1.402.35

And the problem is gone!!! At least partial.
I have no missalignments - but the width is still ignored.
I can enter whatever width I want - it displays the row pretty small.
<ExpandCollapseColumn ItemStyle-Width="40px" HeaderStyle-Width="40px"
Anyhow - it is no longer missaligned :)

Regards


Manfred
0
Sebastian
Telerik team
answered on 06 Apr 2009, 10:55 AM
Hello Manfred,

Try to assign the properties for the GridExpandColumn directly through the master table tag as follows:

<MasterTableView ExpandCollapseColumn-HeaderStyle-Width="40px">

Thus when the column is built at runtime it will have owner and the settings applied declaratively for it should be taken into account. The other solution would be to assign the properties for the column programmatically from the code-behind.

Best regards,
Sebastian
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
ManniAT
Top achievements
Rank 2
answered on 06 Apr 2009, 11:20 AM
Hi Sebastian,

your suggestion worked.
And I guess if I have nested views I should set this in the inner views via:
<telerik:GridTableView Expan.... 
Am I right?

Thanks a lot

Manfred
0
Sebastian
Telerik team
answered on 06 Apr 2009, 11:33 AM
Yes, Manfred, your assumption is correct. For nested tables you need to apply the expand column setting through the GridTableView tag.

Best regards,
Sebastian
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Thomas
Top achievements
Rank 1
Answers by
Vlad
Telerik team
ManniAT
Top achievements
Rank 2
Pavel
Telerik team
Sebastian
Telerik team
Share this question
or