I`m trying to make interaction between two RAGrid controls like in attach, but I wish to make it working in both directions, i.e. moving in grid1 causes row chande in grid2, and moving in grid2 should cause row chande in grid1.

Attach comes with arrowed line commented. If I try to run file compiled without that comment (like in code below) gives me "unknown software exeption 0xc00000fd".

What should I do to make it working?


wmnotify:
cmp , IDC_GRID1
je idcgrid1
cmp , IDC_GRID2
je idcgrid2
jmp default

idcgrid1:
mov eax,
mov eax,
cmp eax,
jne default

mov eax,
cmp , GN_AFTERSELCHANGE
jne default
invoke SendMessage, , GM_SETCURROW, , 0
jmp default

idcgrid2:
mov eax,
mov eax,
cmp eax,
jne default

mov eax,
cmp , GN_AFTERSELCHANGE
jne default
invoke SendMessage, , GM_SETCURROW, , 0  ;<-------
jmp default
Attachments:
Posted on 2005-11-29 07:19:48 by veach1
My guess is that your code enters an endless loop. Moving the selection triggers a new event that triggers a new event that triggers a new event...
You must design your code so that only the grid that has the focus updates the other.

KetilO
Posted on 2005-11-29 07:27:04 by KetilO
:I`m insane:
Posted on 2005-11-30 01:20:56 by veach1