xbrotherx
10-25-2006, 08:44 PM
The datagrid setup I am having an issue requires that the datagrid always shows 20 rows but the dataprovider can be of length 0-20. So sometimes only a few rows have data and the rest are blank.
My requirement for the tabbing on this is the user should be able to tab through each editable cell on the rows with data but only tab through the first column on the rows with no data.
I have accoplished this through testing the value of column[0] on each row. If there is no data then set the rows other cells to edtiable = false like so:
myDatagrid.getColumnAt[otherColumnIndex].editable = false;
Now because that sets the whole column throughout all rows as uneditable, when I click on a row that has data in column[0], set the row's other columns to be editable.
Problem I have is, if the user tabs into a column[0] with no data, enters some data and then tabs, they would expect to go to the next few columns on that same row. But instead, the focus is thrown down to the next row into column[0]. This is because there is a method in in /mx/controls/Datagrid.as called findNextCell() that predetermines what cell to go to next and if that next cell is not editable find one that is. This method also goes ahead and sets the focus to the next editable cell which in my case is on the next row.
So does anyone know of a better way to tab through datagrid cells and not through others?
My requirement for the tabbing on this is the user should be able to tab through each editable cell on the rows with data but only tab through the first column on the rows with no data.
I have accoplished this through testing the value of column[0] on each row. If there is no data then set the rows other cells to edtiable = false like so:
myDatagrid.getColumnAt[otherColumnIndex].editable = false;
Now because that sets the whole column throughout all rows as uneditable, when I click on a row that has data in column[0], set the row's other columns to be editable.
Problem I have is, if the user tabs into a column[0] with no data, enters some data and then tabs, they would expect to go to the next few columns on that same row. But instead, the focus is thrown down to the next row into column[0]. This is because there is a method in in /mx/controls/Datagrid.as called findNextCell() that predetermines what cell to go to next and if that next cell is not editable find one that is. This method also goes ahead and sets the focus to the next editable cell which in my case is on the next row.
So does anyone know of a better way to tab through datagrid cells and not through others?