MonthYearPicker in Filter

4 posts, 1 answers
  1. Kurt Kluth
    Kurt Kluth avatar
    144 posts
    Member since:
    Oct 2009

    Posted 26 Mar 2013 Link to this post

    Have a column in my DataGrid which I have formatted to GridDateTimeColumn and set the filter option to include the Datapicker. 

    What I would like to do is use the MonthYearPicker instead. How would I go about this?  Also when passing the filtered date along I want to verify it is the last day of that month, is there a way to do that in the control?
    <telerik:GridDateTimeColumn DataField="cycle_date" DataFormatString="{0:d}"
     FilterControlAltText="Filter column13 column" HeaderText="CYCLE DATE"
     MinDate="1993-01-01" UniqueName="cycle_date" DataType="System.DateTime"
     EditDataFormatString="MM/YYYY">
     <HeaderStyle HorizontalAlign="Center" />
     <ItemStyle HorizontalAlign="Right" Width="125px" />
    </telerik:GridDateTimeColumn>
  2. Kurt Kluth
    Kurt Kluth avatar
    144 posts
    Member since:
    Oct 2009

    Posted 26 Mar 2013 Link to this post

    Have figured out the first part by using <FitlerTemplate> for the column. 

    How can I get the Filter icon to show for this column?  It only shows a textbox to hold the value and picker.  Also when I select a date it will set the date to "03/year selected".  I can't get it to give me any other month.
    <telerik:GridDateTimeColumn DataField="cycle_date" DataFormatString="{0:MM/yyyy}"
        FilterControlAltText="Filter cycle_date column" HeaderText="CYCLE DATE"
        UniqueName="cycle_date" DataType="System.DateTime"
        ShowFilterIcon="True">
        <HeaderStyle HorizontalAlign="Center" />
        <ItemStyle HorizontalAlign="Right" Width="125px" />
        <FilterTemplate>
            <telerik:RadMonthYearPicker ID="RadMonthYearPicker1" runat="server" DateInput-DateFormat="MM/yyyy"
            AutoPostBack="False" ViewStateMode="Enabled" DatePopupButton-ToolTip="Filter for a specific Cycle Date."
            ShowPopupOnFocus="True"
            MonthYearNavigationSettings-NavigationNextText="Next" MonthYearNavigationSettings-NavigationNextToolTip="Next View"
            MonthYearNavigationSettings-NavigationPrevText="Prev" MonthYearNavigationSettings-NavigationPrevToolTip="Previous View">
            </telerik:RadMonthYearPicker>
        </FilterTemplate>
    </telerik:GridDateTimeColumn>
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Answer
    Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 27 Mar 2013 Link to this post

    Hi,

    One suggestion is that you can customize the template by  placing an Image in the filtertemplate. Check the following help documentation for more.
    Filter Template

    Thanks,
    Princy
  5. Kurt Kluth
    Kurt Kluth avatar
    144 posts
    Member since:
    Oct 2009

    Posted 27 Mar 2013 Link to this post

    Princy,

    Thank you for your response.  We ended up turning off filtering in the datagrid, but know this will come up in the future.

Back to Top