L
Luigi
Hi all,
I have a GridView ComponentArt that must shows a paper clip when a record
has an attachment (the query returns an Id if exists, and 0 if does not
exists).
My actual code is this one:
<ComponentArt:GridServerTemplate ID="AttachmentTemplate" runat="server">
<template>
<cc1:LinkButton runat="server" ID="btnAttachment"
CommandName="ShowAttachment" CommandArgument='<%#
Container.DataItem["AttachId"] %>'>
<img src="images/graffetta.gif" title="Attachment" alt="Attachment"
border="0" /></cc1:LinkButton>
</template>
</ComponentArt:GridServerTemplate>
and:
<ComponentArt:GridColumn AllowSorting="False" DataField="AttachId"
HeadingText="Attachment" Align="center"
DataCellServerTemplateId="AttachmentTemplate" Width="80" />
but it always shows the paper clip, also if there is none attachment.
How can I adjust this problem?
Thanks in advance.
Luigi
I have a GridView ComponentArt that must shows a paper clip when a record
has an attachment (the query returns an Id if exists, and 0 if does not
exists).
My actual code is this one:
<ComponentArt:GridServerTemplate ID="AttachmentTemplate" runat="server">
<template>
<cc1:LinkButton runat="server" ID="btnAttachment"
CommandName="ShowAttachment" CommandArgument='<%#
Container.DataItem["AttachId"] %>'>
<img src="images/graffetta.gif" title="Attachment" alt="Attachment"
border="0" /></cc1:LinkButton>
</template>
</ComponentArt:GridServerTemplate>
and:
<ComponentArt:GridColumn AllowSorting="False" DataField="AttachId"
HeadingText="Attachment" Align="center"
DataCellServerTemplateId="AttachmentTemplate" Width="80" />
but it always shows the paper clip, also if there is none attachment.
How can I adjust this problem?
Thanks in advance.
Luigi