I have a data grid view with columns : IdentityNumber , Name , Date . Each column represents different types of values . identityNumner is an integer , Name is a string , and date is DateTime.
My goal is to click on a column's header and the sort will be done accoding to the types above. The auto sort without doing anything is sort by string as I can see . but how do I achive my goal ?
I have found a solution for my problem . Please check the answer below .
Found a solution for my problem :
Inside the ctor of the form I registered the data grid view's SortCompare event :
The custom function Iv'e build is :
Hope my answer will help someone :-) Shuki .