Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 05-21-2004, 11:23 AM   #1
Registered User
Join Date: Apr 2003
Location: Southern California
Posts: 58
Send a message via AIM to hugobossv8
Default DataSet DataGrid CellRenderer bug?

Hi I'm attempting to bind a DataSet to a DataGrid with the CellRenderer included. I'm experiencing some bugs that I've reported to Macromedia. Any ideas on how to fix these issues?

Bug1: If you click on a CheckBox in the DataGrid, after the CheckBox (Select) column has been sorted, the column gets automatically sorted subsequent to clicking on a CheckBox – confusing behavior.

Bug2: If you scroll to the bottom of the DataGrid and click on a CheckBox, the scrollbar jumps back up to the top of the grid automatically – also confusing.

Recreation Steps:
1)-Add DataGrid (instance name: dgDataGrid) and DataSet (instance name: dsDataSet) to stage.
2)-Bind dataProvider of DataSet to dataProvider of DataGrid
3)-Add fields to Schema of DataSet
4)-Add CellRenderer for Check Box by adding creating MovieClip with AS 2.0 class of mx.controls.cells.CheckCellRenderer
5)-Add data to DataSet using dataProvider in ActionScript

Bindings: dataProvider of DataSet is bound to dataProvider of DataGrid, direction in/out
Schema: Add Type:String, Color:String, and Select:String to DataSet schema

ActionScript on first frame:
//import classes and define datatypes
import mx.controls.gridclasses.DataGridColumn;
var fruit:Array
var dsDataSet:mx.data.components.DataSet
var dgDataGrid:mx.controls.DataGrid
fruit = new Array()
fruit.push({Type: "Banana", Color: "Yellow"})
fruit.push({Type: "Apple", Color: "Red"})
fruit.push({Type: "Orange", Color: "Orange"})
fruit.push({Type: "Tomato", Color: "Red"})
fruit.push({Type: "Strawberry", Color: "Red"})
//---------create columns and apply renderer--------------
var column:mx.controls.gridclasses.DataGridColumn;
column = new DataGridColumn("Select");
column.headerText = "Select";
column.width = 45;
column.cellRenderer = "CheckCellRenderer";
column = new DataGridColumn("Type");
column.headerText = "Type";
column.width = 75;
column = new DataGridColumn("Color");
column.headerText = "Color";
column.width = 75;
//add Data to dataSet
dsDataSet.dataProvider = fruit
Attached Files
File Type: zip bugsCheckBoxSortingSelecting.zip (418.8 KB, 518 views)
hugobossv8 is offline   Reply With Quote
Old 07-28-2005, 08:32 AM   #2
Registered User
Join Date: Jun 2005
Posts: 8

dunno . . im having issues with the same combination: datagrid, dataset, and checkcellrenderer . . for me the check unchecks itself when you rollout after checking it . . doesnt hold the check . . ive read alot of other people having problems with it too . . with no answers . . .
epeace is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

All times are GMT. The time now is 03:24 PM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.