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

Annoying White Line

7 Answers 65 Views
Grid
This is a migrated thread and some comments may be shown as answers.
New User
Top achievements
Rank 1
New User asked on 01 Aug 2011, 05:19 PM
I have an annoying white line in my grid on the CommandItemSettings line right beside my export to excel button.  Is there anyway of getting rid of it?

Here is my ASPX code

<%

@ Page Language="C#" AutoEventWireup="true" CodeBehind="OpenItemsInventory.aspx.cs"

 

 

Inherits="Sterling.SNEF.Tax.Web.OpenItemsInventory" %>

 

<%

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

 

<!

 

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 

<

 

html xmlns="http://www.w3.org/1999/xhtml">

 

<

 

head runat="server">

 

 

<title>Open Items Inventory</title>

 

</

 

head>

 

<

 

telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

 

 

<script type="text/javascript">

 

 

var rad_val;

 

 

function onFutureInventory(sender, args) {

 

document.getElementById(

'<%= btnFutureInventory.ClientID %>').disabled = true;

 

 

GetRadioValue();

 

var windowURL = "FutureInventoryDialog.aspx?ViewByType=" + rad_val

 

 

var oWnd = $find("<%= dlgFutureInventory.ClientID%>");

 

oWnd.setUrl(windowURL);

oWnd.SetSize(470, 505);

oWnd.show();

oWnd.set_initialBehaviors(Telerik.Web.UI.WindowBehaviors.Close);

oWnd.set_behaviors(Telerik.Web.UI.WindowBehaviors.Close);

oWnd.SetModal(

true);

 

 

}

 

 

function GetRadioValue()

 

{

message =

"";

 

surplusMessage =

"";

 

 

 

if (document.getElementById('<%= rdoAssignee.ClientID %>').checked)

 

{

rad_val =

"Assignee";

 

}

 

else

 

{

rad_val =

"State";

 

}

}

 

 

function onFutureInventoryClose(sender, eventArgs) {

 

document.getElementById(

'<%= btnFutureInventory.ClientID %>').disabled = false;

 

}

 

 

function onRequestStart(sender, args)

 

{

 

if (args.get_eventTarget().indexOf("ExportToExcelButton") >= 0)

 

{

args.set_enableAjax(

false);

 

}

}

 

 

</script>

 

</

 

telerik:RadCodeBlock>

 

<

 

body>

 

 

<form id="form1" runat="server">

 

 

<telerik:RadScriptManager ID="OpenItemsInventoryScriptManager" runat="server">

 

 

</telerik:RadScriptManager>

 

 

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">

 

 

<ClientEvents OnRequestStart="onRequestStart" />

 

 

<AjaxSettings>

 

 

<telerik:AjaxSetting AjaxControlID="Panel1">

 

 

<UpdatedControls>

 

 

<telerik:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="LoadingPanel" />

 

 

</UpdatedControls>

 

 

</telerik:AjaxSetting>

 

 

</AjaxSettings>

 

 

</telerik:RadAjaxManager>

 

 

<telerik:RadWindow ID="dlgFutureInventory" runat="server" Skin="Web20" EnableViewState="False"

 

 

KeepInScreenBounds="True" ReloadOnShow="True" ShowContentDuringLoad="False" VisibleStatusbar="False"

 

 

Behaviors="None" OnClientClose="onFutureInventoryClose" onclientOverlay="True">

 

 

</telerik:RadWindow>

 

 

<telerik:RadAjaxLoadingPanel ID="LoadingPanel" runat="server" Skin="Web20">

 

 

</telerik:RadAjaxLoadingPanel>

 

 

<asp:Panel ID="Panel1" runat="server">

 

 

<asp:Label ID="lblViewBy" runat="server" Font-Bold="True" Text="View By:" Font-Names="Arial"></asp:Label>

 

 

<asp:RadioButton ID="rdoAssignee" runat="server" Text="Assignee" GroupName="ViewByGroup"

 

 

OnCheckedChanged="ViewByGroup_CheckedChanged" Checked="true" AutoPostBack="true"

 

 

Font-Names="Arial" Font-Size="Smaller" />&nbsp;&nbsp;

 

 

<asp:RadioButton ID="rdoState" runat="server" Text="State" GroupName="ViewByGroup"

 

 

OnCheckedChanged="ViewByGroup_CheckedChanged" AutoPostBack="true" Font-Names="Arial"

 

 

Font-Size="Smaller" />

 

 

<br />

 

 

<br />

 

 

<div style=" border: thin solid #5177B5; left: 5px; position: relative; left: 5px; width: 760px;">

 

 

<table border="1" width="760px" style="border-collapse: collapse;">

 

 

<tr>

 

 

<td align="center" style="width: 145px; background-color: #7FA5D7;">

 

 

<asp:Label ID="lblhdrAssignee" runat="server" Text="Assignee" Font-Bold="True" Font-Names="Arial"

 

 

Font-Size="12px" ForeColor="White"></asp:Label>

 

 

</td>

 

 

<td align="center" style="width: 100px; background-color: #7FA5D7;">

 

 

<asp:Label ID="Label2" runat="server" Text="Jurisdictions" Font-Bold="True" Font-Names="arial,sans-serif"

 

 

Font-Size="12px" ForeColor="White"></asp:Label>

 

 

</td>

 

 

<td align="center" style="width: 100px; background-color: #7FA5D7;">

 

 

<asp:Label ID="Label6" runat="server" Text="Prior Open Items" Font-Bold="True" Font-Names="Arial"

 

 

Font-Size="12px" ForeColor="White"></asp:Label>

 

 

</td>

 

 

<td align="center" style="width: 100px; background-color: #7FA5D7;">

 

 

<asp:Label ID="Label7" runat="server" Text="Current Open Items" Font-Bold="True"

 

 

Font-Names="Arial" Font-Size="12px" ForeColor="White"></asp:Label>

 

 

</td>

 

 

<td align="center" style="width: 110px; background-color: #7FA5D7;">

 

 

<asp:Label ID="Label4" runat="server" Text="Items Left to Pay" Font-Bold="True" Font-Names="Arial"

 

 

Font-Size="12px" ForeColor="White"></asp:Label>

 

 

</td>

 

 

<td align="center" style="width: 100px; background-color: #7FA5D7;">

 

 

<asp:Label ID="Label5" runat="server" Text="% Complete" Font-Bold="True" Font-Names="Arial"

 

 

Font-Size="12px" ForeColor="White"></asp:Label>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td align="center" style="width: 150px;">

 

 

<asp:Label ID="Label1" runat="server" Text="Totals" Font-Bold="True" Font-Names="Arial"

 

 

Font-Size="Smaller" ></asp:Label>

 

 

</td>

 

 

<td align="center" style="width: 100px;">

 

 

<asp:Label ID="lblhdrJurisdictions" runat="server"></asp:Label>

 

 

</td>

 

 

<td align="center" style="width: 100px;">

 

 

<asp:Label ID="lblhdrPrior" runat="server"></asp:Label>

 

 

</td>

 

 

<td align="center" style="width: 100px;">

 

 

<asp:Label ID="lblhdrCurrent" runat="server"></asp:Label>

 

 

</td>

 

 

<td align="center" style="width: 100px;">

 

 

<asp:Label ID="lblhdrItemsLeft" runat="server"></asp:Label>

 

 

</td>

 

 

<td align="center" style="width: 100px;">

 

 

<asp:Label ID="lblhdrPctComplete" runat="server"></asp:Label>

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

</div>

 

 

<br />

 

 

<table>

 

 

<tr>

 

 

<td>

 

 

<asp:Label ID="lblCurrentandPrior" runat="server" Font-Bold="True" Font-Size="Large"

 

 

Font-Names="Arial">Current and

 

Prior Inventory by Assignee

</asp:Label>

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

<table>

 

 

<tr>

 

 

<td colspan="3">

 

 

<telerik:RadGrid ID="grdCurrentandPrior" runat="server" AllowSorting="True" AutoGenerateColumns="False"

 

 

GridLines="Horizontal" Skin="Web20" Style="margin-right: 0px" Width="770px" Height="265px"

 

 

OnNeedDataSource="grdCurrentandPrior_NeedDataSource">

 

 

<ExportSettings FileName="OpenItemsCurrentInventory" IgnorePaging="True" OpenInNewWindow="True"

 

 

ExportOnlyData="true" >

 

 

<Excel Format="HTML" />

 

 

</ExportSettings>

 

 

<MasterTableView CommandItemDisplay="Bottom" AllowNaturalSort="false">

 

 

<CommandItemSettings ShowExportToExcelButton="true" ShowAddNewRecordButton="false"

 

 

ShowRefreshButton="false" />

 

 

<Columns>

 

 

<telerik:GridTemplateColumn HeaderText="Assignee" UniqueName="Assignee" SortExpression="Assignee">

 

 

<HeaderStyle Font-Bold="True" Width="150px" HorizontalAlign="Center" Font-Names="Arial" />

 

 

<ItemTemplate>

 

 

<asp:Label ID="lbAssignee" runat="server" Text='<%# Eval("Assignee") %>'></asp:Label>

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridTemplateColumn HeaderText="State" UniqueName="State" SortExpression="State"

 

 

Visible="false">

 

 

<HeaderStyle Font-Bold="True" Width="150px" HorizontalAlign="Center" Font-Names="Arial" />

 

 

<ItemTemplate>

 

 

<asp:Label ID="lbState" runat="server" Text='<%# Eval("State") %>'></asp:Label>

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridTemplateColumn HeaderText="Jurisdictions" UniqueName="JurisdictionCount"

 

 

SortExpression="JurisdictionCount">

 

 

<HeaderStyle Font-Bold="True" Width="100px" HorizontalAlign="Center" Font-Names="Arial" />

 

 

<ItemTemplate>

 

 

<asp:Label ID="lbJurisdiction" runat="server" Text='<%# Eval("JurisdictionCount", "{0:N0}")%>'></asp:Label>

 

 

</ItemTemplate>

 

 

<ItemStyle HorizontalAlign="Right" ForeColor="Black" />

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridTemplateColumn HeaderText="Prior Open Items" UniqueName="OpenItemsCountPrior"

 

 

SortExpression="OpenItemsCountPrior">

 

 

<HeaderStyle Font-Bold="True" Width="100px" HorizontalAlign="Center" Font-Names="Arial" />

 

 

<ItemTemplate>

 

 

<asp:Label ID="lbPrior" runat="server" Text='<%# Eval("OpenItemsCountPrior", "{0:N0}") %>'></asp:Label>

 

 

</ItemTemplate>

 

 

<ItemStyle HorizontalAlign="Right" ForeColor="Black" />

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridTemplateColumn HeaderText="Current Open Items" UniqueName="OpenItemsCountCurrent"

 

 

SortExpression="OpenItemsCountCurrent">

 

 

<HeaderStyle Font-Bold="True" Width="100px" HorizontalAlign="Center" Font-Names="Arial" />

 

 

<ItemTemplate>

 

 

<asp:Label ID="lbCurrent" runat="server" Text='<%# Eval("OpenItemsCountCurrent", "{0:N0}") %>'></asp:Label>

 

 

</ItemTemplate>

 

 

<ItemStyle HorizontalAlign="Right" ForeColor="Black" />

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridTemplateColumn HeaderText="Items Left to Pay" UniqueName="TotalRemainingItems"

 

 

SortExpression="TotalRemainingItems">

 

 

<HeaderStyle Font-Bold="True" Width="105px" HorizontalAlign="Center" Font-Names="Arial" />

 

 

<ItemTemplate>

 

 

<asp:Label ID="lblTotalRemain" runat="server" Text='<%# Eval("TotalRemainingItems", "{0:N0}") %>'></asp:Label>

 

 

</ItemTemplate>

 

 

<ItemStyle HorizontalAlign="Right" ForeColor="Black" />

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridTemplateColumn HeaderText="% Complete" UniqueName="clmPctComplete" SortExpression="PercentComplete">

 

 

<HeaderStyle Font-Bold="True" Width="100px" HorizontalAlign="Center" Font-Names="Arial" />

 

 

<ItemTemplate>

 

 

<asp:Label ID="lblPctComplete" runat="server" Text='<%# Eval("PercentComplete", "{0:F2}%")%>'></asp:Label>

 

 

</ItemTemplate>

 

 

<ItemStyle HorizontalAlign="Right" ForeColor="Black" />

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridBoundColumn DataField="AssigneeEmployeeKey" ReadOnly="True" UniqueName="AssigneeEmployeeKey"

 

 

Visible="False">

 

 

</telerik:GridBoundColumn>

 

 

</Columns>

 

 

</MasterTableView>

 

 

<HeaderStyle BorderStyle="Solid" />

 

 

<ClientSettings>

 

 

<Scrolling AllowScroll="True" UseStaticHeaders="True" />

 

 

</ClientSettings>

 

 

</telerik:RadGrid>

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

<br />

 

 

<table>

 

 

<tr>

 

 

<td>

 

 

<asp:Button ID="btnFutureInventory" runat="server" Text="Future Inventory" SkinID="Web20"

 

 

OnClientClick="onFutureInventory(); return false;" Width="164px" UseSubmitBehavior="false" />

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

</asp:Panel>

 

 

</form>

 

</

 

body>

 

</

 

html>

 



Any help would be appreciated.

7 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 1
answered on 02 Aug 2011, 08:12 AM
Hello,

Try the following CSS to achieve your scenario.
CSS:
<style type="text/css">
.RadGrid_Web20 .rgCommandRow
{
color: Transparent !important;
}
</style>

Thanks,
Shinu.
0
MBEN
Top achievements
Rank 1
Veteran
answered on 27 Nov 2011, 12:05 AM
I tried this approach but it does not remove the line in my case.
Any help?
0
Antonio Stoilkov
Telerik team
answered on 28 Nov 2011, 04:09 PM
Hello Kristi,

The solution is to subscribe to ItemCreated event of the RadGrid and remove the unwanted element. I have pasted the code below for your reference.

protected void grdCurrentandPrior_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)
{
    if (e.Item is GridCommandItem)
    {
        ((Table)e.Item.Cells[0].Controls[0]).Rows[0].Cells[1].Controls.RemoveAt(1);
    }
}

All the best,
Antonio Stoilkov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
MBEN
Top achievements
Rank 1
Veteran
answered on 28 Nov 2011, 07:11 PM
that worked.
0
MBEN
Top achievements
Rank 1
Veteran
answered on 17 Dec 2012, 10:48 PM
Hi,

I just upgraded to the latest controls of Telerik and this code seems to break in the latest version. I can still see the line in command item if I comment the code out.
0
Antonio Stoilkov
Telerik team
answered on 20 Dec 2012, 06:21 AM
Hi,

In order to resolve your issue you could modify the previous page with the code provided below.
((Table)e.Item.Cells[0].Controls[0]).Rows[1].Cells[1].Controls.RemoveAt(1);

Note that the problem is caused from a change in the RadGrid rendering in order to provide accessibility support.

Greetings,
Antonio Stoilkov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
MBEN
Top achievements
Rank 1
Veteran
answered on 09 Jan 2013, 08:41 PM
I ended up putting this in my grid css and it works:


.RadGrid_default .rgCommandRow

{  

background:#b5b5b5 0 -2099px repeat-x url('Grid/sprite.gif');

color: Transparent !important;

}

Tags
Grid
Asked by
New User
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 1
MBEN
Top achievements
Rank 1
Veteran
Antonio Stoilkov
Telerik team
Share this question
or