Border not displayed if cell is empty in Internet Explorer

13 posts, 0 answers
  1. Softec
    Softec avatar
    45 posts
    Member since:
    Sep 2007

    Posted 11 Dec 2008 Link to this post

    Hi

    There seems to be an Internet Explorer related bug in combination with some of the RadGrid Skins. If there is a border around the selected row (ie Gray, Telerik), any cell which is empty won't get any border. The Css is fine, everything is ok, only IE doesn't render it...
    I encountered this in combination with a edit / delete column where the delete button / text gets invisible in editmode. 
    It's working in every other browser i tested. My workaround at the moment is to set the delete column to visible = false if the row is in edit mode but maybe there is some better solution to this. I tried to set the GridDeleteColumn.Text to   but whitout success. 

    Thanks!
  2. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 11 Dec 2008 Link to this post

    Hi Studach Joerg,

    The observed glitch is a well-known limitation of Internet Explorer. RadGrid inserts   strings to all its data cells by default, except for GridTemplateColumn cells. When using template columns, you can add a   string at the end of the item template.

    There are cases in which the datasource will flush the   strings, e.g. if a certain field contains a space. In such cases you should check for empty cells in ItemDataBound and insert   strings manually:

    http://www.telerik.com/community/forums/aspnet/grid/empty-cells-gridlines-are-not-appearing.aspx

    As for the delete function column - you should set the HeaderText to be   , not Text.

    Greetings,
    Dimo
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Kevin Schlegelmilch
    Kevin Schlegelmilch avatar
    5 posts
    Member since:
    Jan 2007

    Posted 11 Dec 2008 Link to this post

    Here's a "hack" that I use.

                            <telerik:GridTemplateColumn HeaderText="Margin">
                                <ItemTemplate>
                                    <asp:Label ID="lblMargin" runat="server" Text='<%# ((Eval("Margin") == null || Eval("Margin") == "") ? "&nbsp;" : Eval("Margin"))  %>' />
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <telerik:RadTextBox skin="Office2007" ID="txtMargin" runat="server" Width="100px"
                                        Text='<%# Eval("Margin") %>' >
                                    </telerik:RadTextBox>
                                </EditItemTemplate>
                            </telerik:GridTemplateColumn>
  5. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 12 Dec 2008 Link to this post

    Hi Kevin,

    Yup, this is a good one, because the &nbsp; string is not rendered unconditionally.

    Greetings,
    Dimo
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  6. towpse
    towpse avatar
    224 posts
    Member since:
    Mar 2008

    Posted 11 May 2009 Link to this post

    I'm currently seeing this issue in firefox and not IE.
    I am hiding two of three columns dynamically on the client. When the two are hidden the visible one does not span the width of the grid and the border is only applying to the visible cell since the other two of course are hidden.
    IE seems to jive though.

    edit: im using this method to show and hide grid columns:

            grid.hideColumn(Col.get_element().cellIndex);
            grid.showColumn(Col.get_element().cellIndex);

    Additionally I am also grouping the rows by one of the column values.

    any thoughts?

    cheers
  7. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 12 May 2009 Link to this post

    Hello towps,

    Please review the reply I provided in this forum thread:
    http://www.telerik.com/community/forums/aspnet/grid/grid-border-problem-in-skin-office2007.aspx

    Best regards,
    Sebastian
    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.
  8. Hung Ha
    Hung Ha avatar
    9 posts
    Member since:
    Sep 2008

    Posted 30 Dec 2010 Link to this post

    Hi,
    I used the same suggested technique

    <asp:label ID="comments" runat="server" Text='<%# ((Eval("comments") = = Null || Eval("comments") = = "") ? "&nbsp;" : Eval("comments")) %>' />

     but it raise an error:
    BC30201: Expression expected

    Do you have any idea about this? I am using visual studio 10, language VB, framework 4.0

  9. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 31 Dec 2010 Link to this post

    Hello,


    I am not familiar with VB, but I can point you to use "IIF" condition as suggested in following forum.
    Display Image or data in cell based on value returned from database


    Happy new year..!


    -Shinu.
  10. Kevin Schlegelmilch
    Kevin Schlegelmilch avatar
    5 posts
    Member since:
    Jan 2007

    Posted 31 Dec 2010 Link to this post

    http://www.developerfusion.com/tools/convert/csharp-to-vb/

    <asp:label ID="comments" runat="server" Text='<%# (If((Eval("Margin") Is Nothing OrElse Eval("Margin") = ""), "&nbsp;", Eval("Margin")))' />

     

  11. Jeff
    Jeff avatar
    5 posts
    Member since:
    Sep 2012

    Posted 23 Apr 2014 in reply to Sebastian Link to this post

    Link provided returns a 404 error, please fix.
  12. Dan
    Dan avatar
    2 posts
    Member since:
    Jan 2015

    Posted 22 Jan 2015 in reply to Dimo Link to this post

    Does this still apply?

    Dimo said: RadGrid inserts &nbsp; strings to all its data cells by default,


    An older version of Telerik.Web.UI.dll (version 2012.2.724.35) seems to insert the &nbsp;'s fine.

    When upgrading to Telerik.Web.UI.dll version 2014.3.1209.35 they do not seem to get inserted.

  13. Dan
    Dan avatar
    2 posts
    Member since:
    Jan 2015

    Posted 22 Jan 2015 in reply to Dan Link to this post

    <script type="text/javascript">        
        $(document).ready(function () {
            Sys.Application.add_load(function loadHandler() {
                $(".RadGrid TD:empty").append(' ');
            });
        });
    </script>

    This is a jQuery option to fix this problem and works through paging, references listed.. any less hacky way to fix the new version of RadGrid? 
  14. Creationator
    Creationator avatar
    7 posts
    Member since:
    Nov 2015

    Posted 02 Aug Link to this post

    Hey, does anyone know how to solve this problem I am having (See image below). The issues are:

    1. In the red-highlighted section, when I click export to pdf everything shows correctly. However if I export to excel I get blank fields (again see image below). Why is this?!?!?!

     

    2. In the orange-highlighted section, the field is suppose to be empty, so the excel is actually displaying the grid correctly. But the PDF is displaying the value "null". Why is that?!?!

     

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