------Solution--------------------
Write Renderer Bai, renderer can get your point of this cell is the first few lines and columns, according to the row and column to change the DataGrid editable attribute, give you a thought:
1.renderer Monitor Click event;
2. The event handler function takes out the row and column index from the Listdatadata, makes the judgment (which row can edit this variable can be passed to renderer by the creation of the renderer);
3.if (True), set the editable property of the Listdata.owner (or parentdocuemnt) to true, and then place the cursor over the cell clicked (Set the Editeditemposition property, how to check it yourself);
4. Monitor the Itemeditend event in the DataGrid, set the editable function to false in the event handler function
------Solution--------------------(validated)
Think of a simpler way to editable= "true" and then simply stop Itemeditbegin to stop Createitemeditor calls,
Listen to the Itemeditbegin event in the DataGrid
Copy Code code as follows:
Private Function Onitemeditbegin (event:datagridevent): void
{
if (event.rowindex = 0)//If it is the first line, do not let the edit
{
Event.stopimmediatepropagation ();
}
}