Setting initial selection in <cfgrid>?
I am trying unsuccessfully to create a <cfgrid> (ColdFusion 9) with an initial selection and I can't seem to get it to work. Note this could be none, some, or all of the rows.
There doesn't seem to be an option to easily to this. I looked at the selectOnLoad attribute, but that will only select the first element.
I then looked at the onload attribute. I created a JavaScript function but calls to ColdFusion.Grid.getGridObject('mygrid) are returning null in it. It appears that this is still too early in the process (although this seemed like exactly what I wanted).
I then tried registering my own event listener with
ColdFusion.Event.registerOnLoad(initializeGrid,null,false,true);
This seemed to be better. I could actually select my rows (and see the selection), but they were immediately unselected by what I assume was some sort of refresh at the end of the load. So this is close, but still doesn't seem to happen after the grid is completely loaded.
This seems to be something people would like to do, but I have been unable to find any examples.
Any ideas?
Thanks!
