Hello All,
I have a DataGrid in which I only want to allow users to select a
PARTICULAR Row when it's in "editable" mode. What I mean by this, is
the DataGrid will have many entries within it's DataProvider - but in
order to edit any records, the user will have to highlight a Row, and
click a provided button - something like "Edit this Record". Once this
event is triggered, the user will not be able to select ANY other Rows
on the DataGrid UNTIL the user Saves the record, OR hits a "Cancel"
button (thus putting the DataGrid back into "normal mode", where any Row
can be selected once again).
In order to provide this type of functionality, would my best bet be
extending the mx.controls.DataGrid? I have a feeling this is the route
I must take.
If extending the mx.controls.DataGrid IS the solution, then which
Function(s) must I Override, in order to make the DataGrid's "Selectable
Rows" ones that I dictate?
To simplify my Database calls, I only want to allow a single record to
be edited at any given time. I know the logic for all of this, will be
based on 2 variables:
1) An "editMode" Boolean variable, which will dictate if
ANY of the DataGrid Rows can be individually selected,
OR, if only the Row that is presently flagged "editable"
can be selected & edited.
2) A variable that contains the information, about
which Row (and Column in cases where only certain
fields are to be editable), the mouse must be over in
order to allow the DataGrid's Row to be selected.
Could any of you, point me in the right direction, as to which functions
I must override, and anything else I must check for to make this whole
thing work?
Thanks in advance for all your help regarding this,
Mike