Recently a customer asked a question that helps demonsrate a couple of concepts

Basically what they wanted to do was to highlight the entire cell when starting an edit session. The default behavior of this functionality is that when you start an edit session, it will focus at the end of the text box. Assumption is that you want to continue to add to the textbox, But in this case, since the client wanted customizaiton of this functionality, there are multiple ways to do it. Although ideally you would do something like this in itemEditBegin event handler, we wanted to demonstrate another nifty way of customizing the stock behavior. Lets look at the code:

flexiciousNmsp.FlexDataGridContainerBase.prototype.stockBeginEdit = flexiciousNmsp.FlexDataGridContainerBase.prototype.beginEdit;
flexiciousNmsp.FlexDataGridContainerBase.prototype.beginEdit = function(cell){
        var txt=this.getEditor().getText();


So what we did here is interesting:
WE took the stock beginEdit function, and essentiall renamed it stockBeginEdit. 
Then we made a new beginEdit function, where we dutifully call the stockBeginEdit
And then finally, we added our logic to beginEdit to highlight the entire text of the cell.

What we did here was nothing extra ordinary - we just leveraged the 
tremendous power of JavaScript - the ability redefine functional behavior at runtime.