Hi,
I have a collection object with column called LastModifiedDate which is a string but stores date value. We have kept it string because if LastModifiedDate is null in database we pass blank values and if some data then we format the date and store in collection. We cannot use nullable datetime as the function is in web service. By saying all these i meant not to ask me to change the datatype of my LastModifiedDate in my collection.
So the same collection gets binded to the xamgrid.. So we are able to see the date but when sorting, the results are not accurate because column is string and it sorts as string. So 01/01/2008 is smaller than 12/30/2007 which should be otherwise.
So can anyone please suggest how to correct this problem. I tried assigning
Please suggest as fast as possible
Sorry for the delay in responding to your post. One way you can do this is to provide a custom sort comparer that will convert strings to dates and compare them as dates. Set the the field.Settings.SortComparer property to the custom comparer.
Hope this helps,
Sandip
Hey i need to resolve this bug as fast as possible. So can any one let me know answer pretty fast.. It would help me guys..