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

Date Filtering Greater Than Less Than Issue

3 Answers 219 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kyle Butler
Top achievements
Rank 2
Kyle Butler asked on 07 Feb 2011, 08:41 PM
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.

3 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 08 Feb 2011, 05:50 PM
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.
0
Kyle Butler
Top achievements
Rank 2
answered on 08 Feb 2011, 08:22 PM
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>
0
Pavlina
Telerik team
answered on 11 Feb 2011, 05:42 PM
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.
Tags
Grid
Asked by
Kyle Butler
Top achievements
Rank 2
Answers by
Pavlina
Telerik team
Kyle Butler
Top achievements
Rank 2
Share this question
or