Radgrid highlighted row height problem

8 posts, 1 answers
  1. Meng
    Meng avatar
    57 posts
    Member since:
    Apr 2011

    Posted 11 May 2011 Link to this post

    Hi,  I met a problem when using radgrid displaying a highlighted row. It is working fine if the height of the row is regular, however, it shows a blue section at the bottom when the height is exceeded the regular size. Please take a look at the attached image. The top screen shot shows the problem. Could anyone please give me some suggestions to solve the problem? Thanks a lot. 

    Regards,
    Meng  
  2. Gimmik
    Gimmik avatar
    170 posts
    Member since:
    May 2011

    Posted 12 May 2011 Link to this post

    Hi Meng,

    I use the row select feature all the time and I've never seen it do that before. Can you post the code you use to create the RadGrid? I'm curious to see if I can replicate the issue on my side.

    Thanks,
    -Gimmik
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Meng
    Meng avatar
    57 posts
    Member since:
    Apr 2011

    Posted 12 May 2011 Link to this post

    Hi Gimmik,

    Thanks for your reply. Here is my code,

    <telerik:RadGrid ID="gv_vendor" runat="server" Width="460" CssClass="RadGrid" GridLines="None" Skin="Office2007" AutoGenerateColumns="false" AllowPaging="True" PageSize="5" AllowSorting="True" OnSortCommand="gvVendor_SortCommand"  OnItemCommand="gvVendor_RowCommand" OnPreRender="gvVendor_PreRender" OnPageIndexChanged="gvVendor_PageIndexChanged" CellSpacing="0" >
            <PagerStyle Mode="NextPrev"></PagerStyle>
            <SelectedItemStyle BackColor="Blue"  /> 
            <MasterTableView DataKeyNames="VendorID">
                 <Columns>
                   <telerik:GridTemplateColumn HeaderStyle-Width="160"  HeaderText="Vendor Name" SortExpression="VendorName">
                        <ItemTemplate>
                            <asp:LinkButton ID="lbl_dlr" runat="server" Text='<%#Eval("VendorName")%>' CommandArgument='<%#Eval("VendorID")%>' CommandName="SingleClick" Visible="true"/>
                        </ItemTemplate>
                   </telerik:GridTemplateColumn>
                   <telerik:GridTemplateColumn HeaderStyle-Width="300" HeaderText="Vendor Type">
                        <ItemTemplate>
                            <asp:Label ID="lbl_vendortype" runat="server" Text='<%#Eval("DisplayVendorTypes")%>' Visible="true"/>
                        </ItemTemplate>
                   </telerik:GridTemplateColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>
    protected void gvVendor_RowCommand(object sender, GridCommandEventArgs e)
            {
                string _commandName = e.CommandName;
      
                switch (_commandName)
                {
                    case (Constants.SL_SingleClick):
                        GridDataItem dataItem = e.Item as GridDataItem;
                        string selectedVendor = Convert.ToString(e.CommandArgument);
                     
                        dataItem.Selected = true;
                        _presenter.SelectedVendor(selectedVendor);
                        break;
                }
            }
  5. Answer
    Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 16 May 2011 Link to this post

    Hi Meng,

    Please refer to:
    http://www.telerik.com/community/code-library/aspnet-ajax/grid/how-to-preserve-the-original-radgrid-selected-hover-row-background-when-using-itemstyle-backcolor.aspx

    Kind regards,
    Pavlina
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  6. Meng
    Meng avatar
    57 posts
    Member since:
    Apr 2011

    Posted 16 May 2011 Link to this post

    Great, Thanks so much for the help. Problem resolved after adding the following style to my css file
    .RadGrid_Office2007 .rgSelectedRow
    {
        background-color:#ffcb60 !important;
    }
  7. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 16 May 2011 Link to this post

    Hi Meng,

    I am glad that the provided link helps to resolve the problem. Please do not hesitate to contact us if other questions or problems arise.

    Best wishes,
    Pavlina
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  8. Zafar
    Zafar avatar
    11 posts
    Member since:
    Feb 2009

    Posted 16 May 2011 Link to this post

    Hello, I am having a similar issue with a little bit different scenario. I tried this solution but it does not seem to solve my issue. I have two columns with a background color and the selection is giving me different behavior based on if I access the page using "localhost" in the url versus the actual server name.

    When I access the page using localhost in the url, the selected row is highlighted nicely with the two columns which have the background color still showing the background color. Please see the attached image.

    But when I access the same page with the server name in the url instead of the local host, the slected row hides the background color of the two columns and actually the bad part is that it hides only half of that. Please see the attached file.

    Your help in this regard woudl be appreciated.

    Thanks!

    Zafar

  9. Zafar
    Zafar avatar
    11 posts
    Member since:
    Feb 2009

    Posted 16 May 2011 Link to this post

    I kept looking and finally was able to resolve this based on the following post.

    http://www.telerik.com/community/forums/aspnet-ajax/grid/half-selected-row.aspx

    Thanks!

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