Date Filtering Greater Than Less Than Issue

4 posts, 0 answers
  1. Kyle Butler
    Kyle Butler avatar
    26 posts
    Member since:
    Jun 2008

    Posted 07 Feb 2011 Link to this post

    I have a radgrid displaying activity logs. Each log contains a date recorded field among other fields. I have filtering applied, but when I select greater than filter and type in a date in the format mm/dd/yyyy (same that the date is displayed in the grid field), the grid does not filter out the dates that are not greater than than the one I typed in. The less than functionality works however.

    What's the deal?

    PS: I've also tried using the DateTime column rather than the Template column, but same issue.
  2. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 08 Feb 2011 Link to this post

    Hi Kyle,

    For your convenience I have attached a sample project which demonstrates the desired functionality. Please examine it and let me know if additional assistance is needed.

    Kind regards,
    Pavlina
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Kyle Butler
    Kyle Butler avatar
    26 posts
    Member since:
    Jun 2008

    Posted 08 Feb 2011 Link to this post

    I'm still having the issue. What I am not doing that you are is using the Need Datasource method. I have a SQL Datasource assigned to the grid by default. Therefore not needing a datasource ever. Think you can see what's going wrong? I'm stumped!

    <telerik:RadGrid ID="grdLogs" runat="server" DataSourceID="dsLogs" GridLines="None" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" PageSize="500" ShowGroupPanel="True" 
    Width="100%" AllowFilteringByColumn="True" EnableEmbeddedSkins="False">
         <ClientSettings AllowDragToGroup="True">
         </ClientSettings>
         <GroupHeaderItemStyle Font-Bold="True" HorizontalAlign="Left" />
         <MasterTableView DataKeyNames="log_id,user_id" DataSourceID="dsLogs">
              <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
                   <Columns>
                        <telerik:GridBoundColumn DataField="user_id" DataType="System.Int32" 
                             HeaderText="user_id" ReadOnly="True" SortExpression="user_id" 
                             UniqueName="user_id" Display="False" Visible="False">
                             <HeaderStyle Font-Bold="True" Font-Italic="False" Font-Overline="False" 
                                  Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Left" 
                                  Wrap="True" />
                             <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" 
                                  Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Left" 
                                  Wrap="True" />
                         </telerik:GridBoundColumn>
                         <telerik:GridDateTimeColumn DataField="log_date" HeaderText="Recorded Date" DataFormatString="{0:MM/dd/yyyy}" FilterControlWidth="95px" PickerType="None" SortExpression="log_date" UniqueName="date">
                              <HeaderStyle Font-Bold="True" Font-Italic="False" Font-Overline="False" 
                                    Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Left" 
                                    Width="125px" Wrap="True" />
                              <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" 
                                    Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Left" 
                                    Wrap="True" />
                               </telerik:GridDateTimeColumn>
                          </Columns>
                          <EditFormSettings>
                               <EditColumn CancelImageUrl="Cancel.gif" EditImageUrl="Edit.gif" InsertImageUrl="Update.gif" UpdateImageUrl="Update.gif">
                           </EditColumn>
                      </EditFormSettings>
              </MasterTableView>
         <FilterItemStyle HorizontalAlign="Left" />
         <FilterMenu EnableEmbeddedSkins="False"></FilterMenu>
         <HeaderContextMenu EnableImageSprites="True" CssClass="GridContextMenu GridContextMenu_Default">
         </HeaderContextMenu>
    </telerik:RadGrid>
  5. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 11 Feb 2011 Link to this post

    Hello Kyle Butler,

    I took the sample code you provided and put it in a sample page following a similar scenario you have, but I was not able to replicate the described issue. Please give it a try and let me know what is the difference in your case.

    All the best,
    Pavlina
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Back to Top