Make a table with one row and two cells. Put the left image in the left cell
and the right image in the right cell. Set align=right for the left cell and
align=left for the right cell. Set appropriate borders, paddings and margins
to 0.
Eliyahu
> Hi,
>
[quoted text clipped - 50 lines]
> ItemStyle-Wrap="false" HeaderText="Name of resource">
> <HeaderTemplate>
<b> R
esource
> Name</b>
> </HeaderTemplate>
[quoted text clipped - 19 lines]
> </HTML>
> ----------------------
ram mohan - 30 May 2004 12:04 GMT
Hi,
Thanks for the reply.. but this does not seem to answer my question.
I am not interested in using 'Table' since I want to use some features
(which make coding less!) of the DataGrid. If I want to use a table the
following code works perfectly by placing two images in the same cell
without any gap between them.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title></title>
</head>
<body>
<table cellpadding="0" cellspacing="0" border="0" bgcolor="#ffffff">
<tr>
<td><img src="file:///X:\Design Time\Working\Source\Web
Editor\QRDotNetWebEditor\images\AccessVersion\minus_icon.gif"
border="0"><img src="file:///X:\Design Time\Working\Source\Web
Editor\QRDotNetWebEditor\images\AccessVersion\spacer.gif"
border="0"><img src="file:///X:\Design Time\Working\Source\Web
Editor\QRDotNetWebEditor\images\AccessVersion\minus_icon.gif"
border="0"></td>
</tr>
</table>
</body>
</html>
HOWEVER, how do I achieve the same effect by using DataGrid..ie., place
two images in one cell of the datagrid without any spacing between them.
Thanks in adv,
hrm.
Eliyahu Goldin - 30 May 2004 13:59 GMT
Ram,
I meant puting a table inside the datagrid column:
<ItemTemplate>
<table><tr><td align="right" style="border:0;padding:0">
<asp:Image BackColor=#ff3333 ImageUrl='<%#
DataBinder.Eval(Container.DataItem, "TabSpaceImage") %>' Runat=server
ID="Image1"/>
</td><td align="left" style="border:0;padding:0">
<asp:Image BackColor=#66cc66 ImageUrl='<%#
DataBinder.Eval(Container.DataItem, "NodeStateImage") %>' Runat=server
ID="Image2"/>
</td></tr></table>
</ItemTemplate>
Eliyahu
> Hi,
>
[quoted text clipped - 30 lines]
> Thanks in adv,
> hrm.
hrm - 30 May 2004 14:01 GMT
Hi Eliyahu,
great! it works.. I actually have to place many images side by side..by
recursive use of this solution (ie., placing more tables in two tds of
outer tabls and giving these 2 tds the suitable properties..) I am able
to place any number of items side by side within one cell of the
DataGrid..
thanks again,
hrm.