Hello,
After looking into the JS code maybe I see where is the problem.
You do not set a Primary Id key.
If this key is not set the grid try to obtain the key, if the primary key can not be obtained we use the first one.
It seems like the grid can not find the primary key and uses the first one.
The values of the first key has spaces, which is not allowed id value.
Please set
$grid->setPrimaryKeyId("mykey");
And your problem will be solved.
Regards
Tony Tomov
TriRand Inc