Problems with making numbers` columns not editable and sort them normal.
I`m converting numbers into strings and use TYPE_USER style.
Such thing occurs:
1,2,3,10,11,20 sorts into 1,10,11,2,20,3

I understand why this happens, so I suggest instead of TYPE_USER make two new types TYPE_TEXT and TYPE_LONG, similar to TYPE_EDITTEXT and TYPE_EDITLONG, but without editing.

p.s. I think there is something more, not sure about sorting two-language-strings started with ", I`ll make some tests to check it for sure and will report.
Posted on 2005-10-12 07:53:24 by veach1
Hi

To make the entire grid non editable, trap the GN_BEFOREEDIT and set the GRIDNOTIFY.fcancel to TRUE (See GridDemo8)
You can even make parts of the grid non editable by testing on GRIDNOTIFY.col and GRIDNOTIFY.row
There is no need to make any read only types.

String sorting is ascii sort and will not sort correctly on locale strings.

If you need better (but slower) string sort you must use TYPE_USER and trap WM_COMPAREITEM (see GridDemo3)

KetilO
Posted on 2005-10-12 08:51:07 by KetilO
trap the GN_BEFOREEDIT and set the GRIDNOTIFY.fcancel to TRUE

Thanks!

String sorting is ascii sort and will not sort correctly on locale strings.

Locale strings, you mean mixed languade strings?
I`ve tried to trap WM_COMPAREITEM and use lstrcmp, nothing changes.
Posted on 2005-10-13 05:44:03 by veach1