H
hrm
Hi,
I am placing two images in the same column of the datagrid as shown by
the code given below. When I view this page in the browser, there is
about 3 pixels of space between the images displayed (I am not
expecting any spacing between these images). I want both the images to
be displayed immediately one after the other without any spacing
between them. How can I avoid this spacing? I tried to set the
ItemStyle-Width property on the <asp:TemplateColumn> to the combined
width of the two images (in pixels ) and also set the
ItemStyle-Wrap="false".. ethese parameters still do not get rid of the
space between the two images in the column.
Any pointers will be greatly appreciated.
Thanks in adv,
hrm.
----
<%@ Page language="c#" Codebehind="WebForm1.aspx.cs"
AutoEventWireup="false" Inherits="RndWeb.WebForm1" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<TABLE id="Table1" style="Z-INDEX: 101; LEFT: 8px; POSITION:
absolute; TOP: 8px" cellSpacing="0"
cellPadding="0" width="100%" border="0">
<TR>
<TD></TD>
</TR>
<TR>
<TD>
<asp:datagrid id="dgRnd" runat="server" BorderWidth="1px"
CellPadding="0" Width="100%" GridLines="Horizontal"
BorderColor="DarkGray" CellSpacing="0" CssClass="BodyTxt"
AutoGenerateColumns="False">
<ItemStyle Wrap="false" BorderWidth="0px"
BorderStyle="None"></ItemStyle>
<HeaderStyle CssClass="DatagridHeader"
BackColor="DarkGray"></HeaderStyle>
<Columns>
<asp:TemplateColumn ItemStyle-Width="42"
ItemStyle-BackColor="#ffff33" ItemStyle-BorderColor="#ff0099"
ItemStyle-Wrap="false" HeaderText="Name of resource">
<HeaderTemplate>
<b> Resource
Name</b>
</HeaderTemplate>
<ItemTemplate>
<asp:Image BackColor=#ff3333 ImageUrl='<%#
DataBinder.Eval(Container.DataItem, "TabSpaceImage") %>' Runat=server
ID="Image1"/>
<asp:Image BackColor=#66cc66 ImageUrl='<%#
DataBinder.Eval(Container.DataItem, "NodeStateImage") %>' Runat=server
ID="Image2"/>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:datagrid>
</TD>
</TR>
<TR>
<TD></TD>
</TR>
</TABLE>
</form>
</body>
</HTML>
----------------------
I am placing two images in the same column of the datagrid as shown by
the code given below. When I view this page in the browser, there is
about 3 pixels of space between the images displayed (I am not
expecting any spacing between these images). I want both the images to
be displayed immediately one after the other without any spacing
between them. How can I avoid this spacing? I tried to set the
ItemStyle-Width property on the <asp:TemplateColumn> to the combined
width of the two images (in pixels ) and also set the
ItemStyle-Wrap="false".. ethese parameters still do not get rid of the
space between the two images in the column.
Any pointers will be greatly appreciated.
Thanks in adv,
hrm.
----
<%@ Page language="c#" Codebehind="WebForm1.aspx.cs"
AutoEventWireup="false" Inherits="RndWeb.WebForm1" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<TABLE id="Table1" style="Z-INDEX: 101; LEFT: 8px; POSITION:
absolute; TOP: 8px" cellSpacing="0"
cellPadding="0" width="100%" border="0">
<TR>
<TD></TD>
</TR>
<TR>
<TD>
<asp:datagrid id="dgRnd" runat="server" BorderWidth="1px"
CellPadding="0" Width="100%" GridLines="Horizontal"
BorderColor="DarkGray" CellSpacing="0" CssClass="BodyTxt"
AutoGenerateColumns="False">
<ItemStyle Wrap="false" BorderWidth="0px"
BorderStyle="None"></ItemStyle>
<HeaderStyle CssClass="DatagridHeader"
BackColor="DarkGray"></HeaderStyle>
<Columns>
<asp:TemplateColumn ItemStyle-Width="42"
ItemStyle-BackColor="#ffff33" ItemStyle-BorderColor="#ff0099"
ItemStyle-Wrap="false" HeaderText="Name of resource">
<HeaderTemplate>
<b> Resource
Name</b>
</HeaderTemplate>
<ItemTemplate>
<asp:Image BackColor=#ff3333 ImageUrl='<%#
DataBinder.Eval(Container.DataItem, "TabSpaceImage") %>' Runat=server
ID="Image1"/>
<asp:Image BackColor=#66cc66 ImageUrl='<%#
DataBinder.Eval(Container.DataItem, "NodeStateImage") %>' Runat=server
ID="Image2"/>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:datagrid>
</TD>
</TR>
<TR>
<TD></TD>
</TR>
</TABLE>
</form>
</body>
</HTML>
----------------------