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

RadTooltip Bind Dates

1 Answer 11 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Vitaly
Top achievements
Rank 1
Vitaly asked on 23 Sep 2013, 02:24 PM
Good morning,
In my aspx page I have created in RadGrid(gridboundcolumn) RadToolTip control:
<telerik:GridTemplateColumn HeaderText="Job" DataField="JOB" UniqueName="JOB" ReadOnly="True" SortExpression="JOB" >
                                    <HeaderStyle Width="50px" />
                                    <ItemStyle Width="50px" />
                                    <ItemTemplate>
                                     <asp:Label ID="lblJob" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.JOB") %>'> </asp:Label>
                                     <telerik:RadToolTip ID="RadToolTip1" runat="server" TargetControlID="lblJob"
                                      Width="180px" RelativeTo="Element" Position="MiddleRight" RenderInPageRoot="true" Animation="Fade"  HideEvent="LeaveToolTip">
                                      JOB EFFECTIVE DATE:
                                      <%# DataBinder.Eval(Container, "DataItem.EFF_DATE")%>
                                      JOB END DATE:
                                      <%# DataBinder.Eval(Container, "DataItem.END_DATE")%>
                                      JOB RESTRICTION FLAG:
                                      <%# DataBinder.Eval(Container, "DataItem.DATE_RESTRICT")%>

                                     </telerik:RadToolTip>
                                    </ItemTemplate>
                                    </telerik:GridTemplateColumn>
When I run application and point mouse over Job Field the date showing like this:06/08/2009 12:00:00am.How to remove time?I need just a date.

Thank you very much for your help

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 1
answered on 24 Sep 2013, 04:50 AM
Hi,

Please try the following code snippet I tried to remove the time from the Tool Tip.

ASPX:
<telerik:GridTemplateColumn HeaderText="Job" DataField="JOB" UniqueName="JOB"
    ReadOnly="True" SortExpression="JOB">
    <HeaderStyle Width="50px" />
    <ItemStyle Width="50px" />
    <ItemTemplate>
        <asp:Label ID="lblJob" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.JOB") %>'> </asp:Label>
        <telerik:RadToolTip ID="RadToolTip1" runat="server" TargetControlID="lblJob" Width="180px"
            RelativeTo="Element" Position="MiddleRight" RenderInPageRoot="true" Animation="Fade"
            HideEvent="LeaveToolTip">
            JOB EFFECTIVE DATE:
            <%# DataBinder.Eval(Container, "DataItem.EFF_DATE", "{0:d}")%>
            JOB END DATE:
            <%# DataBinder.Eval(Container, "DataItem.END_DATE", "{0:d}")%>
            JOB RESTRICTION FLAG:
            <%# DataBinder.Eval(Container, "DataItem.DATE_RESTRICT", "{0:d}")%>
        </telerik:RadToolTip>
    </ItemTemplate>
</telerik:GridTemplateColumn>

Thanks,
Princy


Tags
General Discussions
Asked by
Vitaly
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 1
Share this question
or