Column width ignored in safari 4.0.x

5 posts, 1 answers
  1. ManniAT
    ManniAT avatar
    877 posts
    Member since:
    Nov 2003

    Posted 22 Jul 2009 Link to this post

    Hi,

    I have a detail table which's columns are defined like this.
    <Columns> 
        <telerik:GridTemplateColumn DataField="Datum" DataType="System.DateTime" HeaderText="Datum" SortExpression="Datum" UniqueName="Datum" HeaderStyle-Width="105px" > 
            <ItemTemplate> 
                <%#((DateTime)Eval("Datum")).ToShortDateString() + " (" + Eval("Dauer") + "h)" %> 
            </ItemTemplate> 
        </telerik:GridTemplateColumn> 
        <telerik:GridTemplateColumn DataField="SettingID" DataType="System.Int32" HeaderText="Setting" SortExpression="SettingID" UniqueName="SettingID" HeaderStyle-Width="90px" > 
            <ItemTemplate> 
                <cc:DataSelectLabel runat="server" Width="85px" DataSourceID="odsSettings" DataTextField="Name" DataValueField="ID" SelectedValue='<%# Eval("SettingID") %>' /> 
            </ItemTemplate> 
        </telerik:GridTemplateColumn> 
        <telerik:GridDropDownColumn DataField="NationID" DataType="System.Int32" HeaderText="Nation" SortExpression="NationID" UniqueName="NationID" DataSourceID="odsNationen" ListTextField="Name" ListValueField="ID" HeaderStyle-Width="130px">  
        </telerik:GridDropDownColumn> 
        <telerik:GridDropDownColumn DataField="WohnsituationID" DataType="System.Int32" HeaderText="Wohnsituation" SortExpression="WohnsituationID" UniqueName="WohnsituationID" DataSourceID="odsWohnsituationen" ListTextField="Name" ListValueField="ID" HeaderStyle-Width="135px">  
        </telerik:GridDropDownColumn> 
        <telerik:GridDropDownColumn DataField="WohngegendID" DataType="System.Int32" HeaderText="Wohngegend" SortExpression="WohngegendID" UniqueName="WohngegendID" DataSourceID="odsWohngegenden" ListTextField="Name" ListValueField="ID" HeaderStyle-Width="165px">  
        </telerik:GridDropDownColumn> 
        <telerik:GridTemplateColumn DataField="BerufssituationID" DataType="System.Int32" HeaderText="Berufssituation" SortExpression="BerufssituationID" UniqueName="BerufssituationID"  HeaderStyle-Width="155px">  
            <ItemTemplate> 
                <cc:DataSelectLabel runat="server" DataSourceID="odsBerufssituationen" DataTextField="Name" DataValueField="ID" SelectedValue='<%# Eval("BerufssituationID") %>' /> 
            </ItemTemplate> 
     
        </telerik:GridTemplateColumn> 
        <telerik:GridTemplateColumn DataField="Anmerkung" HeaderText="Anmerkung" SortExpression="Anmerkung" UniqueName="Anmerkung" HeaderStyle-Width="100px">  
            <ItemTemplate> 
                <asp:HyperLink ID="hlDetails" runat="server" NavigateUrl="#" Text='<%#((bool)(Eval("Anmerkung").ToString().Length > 12)) ? Eval("Anmerkung").ToString().Substring(0, 12) + "..." : ((bool)(Eval("Anmerkung").ToString().Length ==0)) ? "DETAILS" : Eval("Anmerkung")%>'></asp:HyperLink> 
            </ItemTemplate> 
        </telerik:GridTemplateColumn> 
    </Columns 
    The width of the details view is set to 880px.
    In IE 8 and FF 3.0.11 this works as expected.

    I made an image of all three situations. http://www.pp-p.net/images/allcols.png
    As you can see Top == IE - Bottom == FF and Middle == Safari - IE and FF are (except one or two pixels) the same.
    By the way - the layout does not really change in safari if I (for an example) change the width of the first column.

    My customer uses a lot of mac's so this is a situation which make really troubles.

    Regards

    Manfred
  2. Pavel
    Admin
    Pavel avatar
    904 posts

    Posted 27 Jul 2009 Link to this post

    Hi Manfred,

    I was not able to observe such a problem with the Grid's columns width in Safari. I am attaching a simple sample which is working as expected on my end and there is no difference in the displayed columns in FF, IE and Safari. Maybe you have some custom css which is causing this behavior? Try the sample page and let me know what you think.

    Best wishes,
    Pavel
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. ManniAT
    ManniAT avatar
    877 posts
    Member since:
    Nov 2003

    Posted 27 Jul 2009 Link to this post

    Hi,

    yes your project works :)
    But I changed it a bit (some columns added and so on).
    And after it took me a while to reproduce my error - I got it now.
    The returned project has 2 grids - one the works (the width) only in IE / FF - the other in Safari also.
    The difference between the two grids - one has a caption - the other not!.

    I'm not sure if client scrolling or so has something to do with the issue - I used it since my project also uses it.
    And so I added point after point till I could reproduce the problem.
    After finding out the thing with the caption - I didn't "re-remove" the things.

    --- Try to change the width of (for an example) EmployeeID... ignored!

    http://www.pp-p.net/Grid.zip

    Regards

    Manfred
  5. Answer
    Pavel
    Admin
    Pavel avatar
    904 posts

    Posted 31 Jul 2009 Link to this post

    Hi Manfred,

    Indeed I can observe the problem, but it seems to be related to Safari and not to our control. I am attaching an aspx which contains a simple table that exhibits the same behavior under Safari. I can suggest you to workaround the issue by applying the following style to the head tag of you page:
    <style type="text/css"
        .rgDetailTable 
        { 
            table-layout:auto !important; 
        } 
    </style> 

    I hope this is helpful.

    Regards,
    Pavel
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  6. ManniAT
    ManniAT avatar
    877 posts
    Member since:
    Nov 2003

    Posted 31 Jul 2009 Link to this post

    Hi Pavel,

    you wrote: "I hope this is helpful"

    Indeed it is - it solved my problem :)

    By the way - I've not been looking for the guilty (I believe that Safari is the one and not your grid).
    I've been looking for a solution.
    And that's what I got with your answer.

    Thank you for the excellent support

    Manfred
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017