Hi,
In ultragrid,the greater than filter is working for the numeric number but not working for date field[Datatype is datetime].I have checked the code from google,every thing is correct like MeetsCriteria override,BeforeRowFilterChanged events etc. but not working.Help is required.
Thanks,
Dinakar
try setting the SortComparer, sort comparer class at the end...
Hi nswider,
Thanks for your reply,I tried but it is not working.Can you suggest the code which will be included in the BeforeRowFilterChanged event.
Regards,
Hello Dinikar,I tried setting the ColumnFilter of a column of type DateTime to greater than a date time, and found it to work properly. Please have a look at the attached sample to see how I did this. If this is not the behavior you are looking for, please let me know how I can further assist you.
Hi John,
Thanks for your response.Whatever you provided the solution is correct but which requires a lot of code changes in the existing project.What i exactly need is to filter the all the dates which are greater than 7/11/2106 in the grid.Please refer the screenshots which are attached.The screenshot1 displays the total grid.In the screenshot2,for the Modified Date column i need the filter condition as in.But in the screenshot3 the output is displying wrongly which is not sorting based on the greater than condition.
Hello Dinakar,The screenshots did not attach properly. Please try zipping them and then reattach to your next response.Can you verify that your column’s data type is the .NET DateTime? If your data is DateTime then you should be finding the numeric filter options in the filter row. If they do not appear there, it may be that you are using some other data type such as string.Please let me know if I can assist you further.
To attach the attachment i am not finding any browse option,previously i have attached the screenshots using the Insert/Edit Image option but you are saying it is not attached properly.So may i know how to attach the screen shots.About the column data type,the datatype in the backend(sql) is DateTime only and in the frontend side the query is directly assigning to the datasource of the ultragrid to display the result in the UI.
Dinakar,
You can try two different ways to attach your screenshots. You can copy/paste the image into the editor, or you can use Reply>Options>File Attachment>Add/Update and you may zip all the screenshots to avoid the attachment size limit.
The data still may be loaded as something other than a DateTime. Please check the grid's column data type to be sure that it is a DateTime once loaded into the grid.