First excuse my english. I have a grid in my page and a method in a WCF Data Service:
I have 2 problems:
1- When the
2.- The grid contains 5 records with
Where is the problem?, Maybe the culture or the DataFormatString?. I've been looking in Google but I can get no answer.
Thanks in advance.
<telerik:RadGrid ID="rgDepartaments" runat="server" AllowPaging="true" AllowSorting="true" AllowFilteringByColumn="true" PageSize="10" AllowMultiRowEdit="true" OnItemCreated="rgDepartaments_ItemCreated"> <MasterTableView DataKeyNames="IdDepartament" ClientDataKeyNames="IdDepartament" CommandItemDisplay="Bottom"> <Columns> <telerik:GridBoundColumn UniqueName="Departament" DataField="Departamento" DataType="System.String"> </telerik:GridBoundColumn> <telerik:GridDateTimeColumn UniqueName="UpdateDate" DataField="UpdateDate" DataType="System.DateTime" DataFormatString="{0:dd/MM/yyyy HH:mm}" HeaderStyle-Width="150px"> </telerik:GridDateTimeColumn> </Columns> </MasterTableView> <ClientSettings> <DataBinding Location="~/DesktopModules/Comun/Services/DepartmentSvc.svc" SelectCountMethod="TotalDepartments"> <DataService TableName="Departament" /> </DataBinding> </ClientSettings></telerik:RadGrid>[WebGet]public int TotalDepartments(string where){ return String.IsNullOrEmpty(where) ? this.CurrentDataSource.Department.Count() : this.CurrentDataSource.Department.Where(where).Count();}I have 2 problems:
1- When the
TotalDepartments is executed with a where condition having a UpdateDate filter I get the following error: Edm.DateTime and Edm.String are not compatible types. 2.- The grid contains 5 records with
UpdateDate (21/07/2011 --> 21st July 2011). When I try to filter through UpdateDate width 16/07/2011 and "major than" I get no record (all records must have been returned). By if I filter with 16/07/2001 and "less than" I get all the records (no record must have been returned).Where is the problem?, Maybe the culture or the DataFormatString?. I've been looking in Google but I can get no answer.
Thanks in advance.