DS_User
07-06-2009, 03:24 PM
Hi All,
I've been fighting with this one for the last few of hours and have come to a full stop.
I've got a datagrid that is being populated via a couple of arrays which works fine until I start using a check box cellrenderer. For example say there are 10 records in the grid and the first record should have a tick box but the bottom 9 shouldn't then again this works fine as long as the datagrid is long enough (height wise) to display all 10 records. However, if the datagrid is only tall enough to display the top 5 records then the records 1 AND 6 will be ticked with no way of unticking record 6. If record 1 and 2 should be ticked then records 6 and 7 will also be ticked, again with no way of unticking?!?! Does that all make sense?
If I use ten lines with the values hardcoded directly into my data provider array then it all works fine such as:
myDP.addItem({field1:"john", field2:1});
but as soon as I go back to arrays to populate the data provider, like below then it all goes wrong again with the weird mimicked ticks:
myDP.addItem({field1:NameArray[1], field2:TickArray[1]});
The values are all from a database so I have to use arrays rather than hard coding....any ideas of a fix or work around????
Hopefully I explained that so it at least made some sense,
Thanks is advance guys and girls
I've been fighting with this one for the last few of hours and have come to a full stop.
I've got a datagrid that is being populated via a couple of arrays which works fine until I start using a check box cellrenderer. For example say there are 10 records in the grid and the first record should have a tick box but the bottom 9 shouldn't then again this works fine as long as the datagrid is long enough (height wise) to display all 10 records. However, if the datagrid is only tall enough to display the top 5 records then the records 1 AND 6 will be ticked with no way of unticking record 6. If record 1 and 2 should be ticked then records 6 and 7 will also be ticked, again with no way of unticking?!?! Does that all make sense?
If I use ten lines with the values hardcoded directly into my data provider array then it all works fine such as:
myDP.addItem({field1:"john", field2:1});
but as soon as I go back to arrays to populate the data provider, like below then it all goes wrong again with the weird mimicked ticks:
myDP.addItem({field1:NameArray[1], field2:TickArray[1]});
The values are all from a database so I have to use arrays rather than hard coding....any ideas of a fix or work around????
Hopefully I explained that so it at least made some sense,
Thanks is advance guys and girls