flex datagrid columns drag -
i have data grid users can drag columns , reposition them. there strange requirement columns should not draged left of other column.
eg, assume columns : name, price , start date, end date,
the end date should not dragged , placed before start date. i.e. user can have
- start date, price , name , end date.
- name, start date, price , end date.
but @ no point can end date appear before start date.
is there way flex? there way know user trying drop column , show error message ?
the solution involves work around.
- first use advanced data grid instead of data grid.
- then create column group , add start date , end date columns it.
- then set childrendragenabled="false" in column group.
- thats work around. sample code below.
solution (notice childrendragenabled="false"
):
<mx:advanceddatagridcolumngroup childrendragenabled="false"> <mx:advanceddatagridcolumn datafield="startdate" /> <mx:advanceddatagridcolumn datafield="enddate" /> </mx:advanceddatagridcolumngroup>
Comments
Post a Comment