GridTemplateColumn Filtering Datetime in HeaderContextMenu

1 posts, 0 answers
  1. Tu
    Tu avatar
    1 posts
    Member since:
    Oct 2017

    Posted 02 May 2018 Link to this post

    Hello,

     

    I have a grid with one of column defined as below, now I want to use HeaderContextMenu to show the filter option but the input is textbox instead of DateTime which should have a small calendar icon on the right side. I have tried manually showing and hiding the textbox by using below jquery at ShowMenu event but the filter just doesn't take value from my input datepicker. Can you show me how to do that?

    $('[id$=DPFirstCond_wrapper]').show();
    $('[id$=DPSecondCond_wrapper]').show();
    $('[id$=TBFirstCond_wrapper]').hide();
    $('[id$=TBSecondCond_wrapper]').hide();

     

    <telerik:GridTemplateColumn SortExpression="StartDate" UniqueName="StartDate"
                                                                DataType="System.DateTime"
                                                                HeaderText="Complan Eff. Date" DataField="StartDate">
                                        <HeaderStyle Width="180px"></HeaderStyle>
                                        <ItemTemplate>
                                            <div runat="server" class='<%# ComPlanCssClass(Eval("StartDate"), Eval("ComPlanPending.StartDate"), Eval("ComPlanPending"))%>'>
                                                <asp:Label Text='<%# ComPlanValue(Eval("StartDate"), Eval("ComPlanPending.StartDate"), Eval("ComPlanPending"))%>' runat="server" />
                                            </div>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
Back to Top