com.judah.controls

class dndDataGrid

mx.updatedcontrols.DataGrid | +--com.judah.controls.dndDataGrid

class dndDataGrid extends DataGrid
Drag and drop DataGrid class
Extended and enhanced DataGrid component based off the Macromedia DataGrid. It follows the same model as the Macromedia DataGrid and can follow the same examples. The dndDataGrid inherits all the public properties and methods of the classes it inherits including all the properties and methods of the MovieClip > UIObject class > UIComponent class > View > ScrollView > ScrollSelectList > SelectableRow > List component > List classes chain. To begin, study the List class documentation, DataGrid class documentation and the properties and methods it inherits. Note: Some of the see also links do not lead to anywhere because they are to properties or methods in inherited classes. You can find more information about them in the Flash Help Panel.
  • Example:
    This example shows two different methods on how to fill the datagrid with data.
    // load data into datagrid
    function loadData() {
    	// method 1
    	var arr:Array = new Array();
    	arr.push({label:"File 1",data:"file"});
    	arr.push({label:"File 2",data:"file"});
    	arr.push({label:"File 3",data:"file"});
    	theDataGrid.dataProvider = arr;
    	
    	// method 2
    	theDataGrid.addItem({label:"Folder 1",data:"folder"});
    	theDataGrid.addItem({label:"Folder 2",data:"folder"});
    	theDataGrid.addItem({label:"File 1",data:"file"});
    	theDataGrid.addItem({label:"File 2",data:"file"});
    	theDataGrid.addItem({label:"File 3",data:"file"});
    }
    loadData()
    

Field Summary

public ADD_BRANCH: Number
Add Branch constant
public ADD_ITEM: Number
Add Item constant
Event generated when a branch item is added
public addBranchPastePosition: Number
Position to add new branch items.
Event generated when an item is added from the context menu
public addItemPastePosition: Number
Position to add new items
public canDropOnEmptyRows: Boolean
Enable drag and drop on empty rows
public canDropOnSameRow: Boolean
Enables drag and drop of onto the same row
public className: String
Class name of the component class
public clickThreshold: Number
time in milliseconds to separate doubleclick from a delayed click
public cm: ContextMenu
Reference to the ContextMenu
public COPY_ITEM: Number
Copy Item constant
public copyIcon: MovieClip
Copy icon shown when dragging
Event generated when a item is copied
public CUT_ITEM: Number
Cut Item constant
Event generated when a item is cut
public defaultBranchItem: Object
Default branch item to use when adding a new datagrid item
public defaultItem: Object
Default item to use when adding a new datagrid item
Event generated when a row is delayed clicked
public dndEnabled: Boolean
Enables or disables drag and drop
public dndGutter: Number
The height in pixels of the gutter space inbetween datagrid items
public dndReadOnly: Boolean
Enables all move operations to be copy operations
public doNotInsertOnDrop: Boolean
Do not insert a row on drop
Event generated when a row is double clicked
public drag_mc: MovieClip
Reference to movieclip when dragging and dropping rows
public dragCell: Boolean
Creates an exact duplicate of only the cell you pressed you are dragging
public dragDuplicateRow: Boolean
Creates an exact duplicate of the row you are dragging.
public dragHighlightAlpha: Number
Transparency amount of the highlight rectangle when dragging
public dragOnRollOut: Boolean
Start dragging when you mouse moves outside of the row
public dragOverPos: Number
Contains current or last position of dragged item
public dragRowStyle: String
The default row style of the rows in the drag mc
public DROP_EVENT: Number
Drop Event constant
public editable: Boolean
Enables or disables editable cells in the datagrid
public enableBranchMenuItem: Boolean
Enable branch menu item
public enabled: Boolean
Enables or disables the datagrid
public enableDragLine: Boolean
Draws a drag line over rows
public enableKeySearch: Boolean
Determines if keypresses in the datagrid find and select rows
public enableRenameItem: Boolean
Determines if an item can be renamed
public errorMsg: String
Error message variable
Defines the header border colors
Header colors for header background
Header press color
Header roll over color
public keyPressFunction: Function
Method to manually handle different key presses
public lastMovedIndex: Number
Index of the last moved item
public lastMovedIndices: Array
Indices of the last moved datagrid items
public lastMovedItem: Object
Reference to the last item moved
public lastMovedItems: Array
Reference to an array of the last moved datagrid items
public lastMovedParent: Object
Parent item of the last moved item
public lastMovedParents: Array
Parent datagrid items of the last moved datagrid items
public lastMovedSource: Object
Owner of the last moved item
public lastMovedSources: Object
Reference to array of the owners of the last moved datagrid items
public lastOver: Number
Absolute index of the row the mouse was last over
public lastOverIndex: Number
Relative index of the row the mouse was last over
public menu
Reference to the ContextMenu.
public MENU_EVENT: Number
Menu Event constant
public METHOD_CALL: Number
Method Call constant
public movementBeforeDrag: Number
Number of pixels the mouse must move before we start dragging
public multipleSelection: Boolean
Enables mutiple selection of rows
Event generated after a drag and drop
Event generated once when a row is first dragged
public PASTE_AFTER: Number
Paste After constant
public PASTE_BEFORE: Number
Paste Before constant
public PASTE_INTO: Number
Paste Into constant
Event generated after pasteItem method is called
Indicates the last pressed cell index
public REMOVE_ITEM: Number
Remove Item constant
Event generated when a item is removed
public RENAME_ITEM: Number
Rename Item constant
Specifies the index of the column to edit when renaming
public renameField: String
Name of rename label to access when using a cellrenderer
Event generated when a item is renamed
public renameOnDoubleClick: Boolean
Determines if an item can be renamed on double click
public renameTextRestrict: String
Indicates set of characters user may enter into the rename text field.
public root_mc: MovieClip
Reference to the root movieclip
public scrollDragSpeed: Number
Scroll drag speed in milliseconds
public showDebug: Boolean
Shows debug information
Event generated when a row is single clicked
public strAddItem: String
Context Menu Item Add Leaf string. Deprecated
public strCopyIcon: String
Id of icon to show when copying an item
public strCopyItem: String
Context Menu Item Copy string. Deprecated
public strCutItem: String
Context Menu Item Cut string. Deprecated
public strNoDropIcon: String
Id of icon when dragging is not permitted
public strPasteAfter: String
Context Menu Item Paste After string. Deprecated
public strPasteBefore: String
Context Menu Item Paste Before string. Deprecated
public strPasteInto: String
Context Menu Item Paste Into string. Deprecated
public strRemoveItem: String
Context Menu Item Remove string. Deprecated
Context Menu Item Rename string. Deprecated
static symbolName: String
The name of the ActionScript class
static symbolOwner: Object
The fully qualified class name
public targetItem: Object
Reference to the target item after drag and drop
public theCopyGridItems: Array
Reference to array of datagrid items created on cut or copy events
public theCopyItems: Array
Reference to array of list items created from cut or copy events
public theCopyNodes: Array
Reference to array of items converted to tree nodes on cut or copy events
public thePasteIntoItem: Object
The item where datagrid items were pasted into
public thePasteToPosition: Number
Relative index where the datagrid items were pasted
public trackDebug: Boolean
Track debug messages in errorMsg variable
public trashCan: MovieClip
Reference to a movieclip to use as a trashcan. Deprecated
public versionNumber: String
Current version number for this component
public visible: Boolean
Displays or hides the datagrid

Property Summary

public copyIconX: Number (write)
Sets the X coordinate for the copy icon
public copyIconX (read)
Gets the X coordinate for the copy icon
public copyIconY: Number (write)
Sets the Y coordinate for the copy icon
public copyIconY (read)
Gets the Y coordinate for the copy icon
public enableContextMenu: Boolean (read, write)
getterEnables or disables the right-click context menu

Constructor

public dndDataGrid ( )
Constructor used when creating a new datagrid

Method Summary

public convertToItem ( theItem )
Converts single datagrid item into a list item
public convertToNode ( theItem )
Converts single datagrid item into a tree node
public copyItem ( theItems, eventSource )
A function to copy datagrid items from the datagrid
public cutItem ( theItems, eventSource, eventType )
A function to cut items from the datagrid
public drawHeaderBG ( Void ): Void
Draws the header background
public drawSeparator ( objPoint, row, dragOverPos, bCanDrop )
Draws separator line when dragging
public dropItem ( theSourceItem, theTargetItem, pastePosition, moveItem, eventSource, eventConstant, cellIndex )
Method used to insert or move items when dropped into the datagrid
public getIsBranch ( item )
Method to determine if the item is a branch
public getIsOpen ( theItem )
Method to check if item is open.
public getItemCellValue ( theItem: Object, cellIndex: Number )
Gets the value of the cell by item and cell index
public getItemIcon ( theItem, subIcon )
Gets the icon id of the item
public getItemIndex ( theItem )
Method to get the index of the item in datagrid
public getItemLabel ( theItem, subLabel )
Gets the label of the item
public getRoot ( mc )
Finds root movieclip and returns a reference to it
public headerPress ( Void ): Void
Draws the header in the pressed state and moves the cell
public headerRollOut ( Void ): Void
Turns off the header overlay roll over color
public headerRollOver ( Void ): Void
Draws the header overlay with color
public iconFunction ( item, columnName )
Method to dynamically set the icon of the row
public labelFunction ( item )
Method to manually set the text of the column label
public modifyDragMC ( drag_mc )
Modifies the drag movieclip before dragging
public onAddBranchItemMenu ( obj, menuItem )
A function called when user selects "add branch item" from the context menu
public onAddLeafItemMenu ( obj, menuItem )
A function called when user selects "add item" from the context menu
User customizable function for manipulating the context menu
public onCopyItemMenu ( obj, menuItem )
A function called when user selects "copy item" from the context menu
public onCutItemMenu ( obj, menuItem )
A function called when user selects "cut item" from the context menu
public onPasteAfterItemMenu ( obj, menuItem )
A function called when user selects "paste after" from the context menu
public onPasteBeforeItemMenu ( obj, menuItem )
A function called when user selects "paste before" from the context menu
public onPasteIntoItemMenu ( obj, menuItem )
A function called when user selects "paste into" from the context menu
public onRemoveItemMenu ( obj, menuItem )
A function called when user selects "remove item" from the context menu
public pasteItem ( theSourceItem, theTargetItem, pastePosition, moveItem, eventSource, eventConstant, cellIndex )
Method to insert or move datagrid items
public permitContextMenu ( theItem, theAction, theMenuItem, theContextMenu, theCellIndex )
A user defined function to display context menu items
public permitDropFunction ( theItem, theTargetItem, theAction, theCellIndex )
A user defined function to allow or prevent drop
public permitRemove ( obj, menuItem, menuCaption, eventType, cellIndex )
A user defined function to allow a user to cut or remove an item
public permitRename ( theItem, cellIndex, eventSource )
A user defined function to allow rename on a item
Removes items from copy and paste clipboard for this component
public renameFunction ( rowIndex, cellIndex, eventSource )
Lets the user override the normal rename method
public setItemLabel ( theItem: Object, labelText: String, originalText: String, cellIndex: Number ): String
A method to call to set the item label
public showRenameItem ( rowIndex: Number, cellIndex: Number, eventSource: Number )
Shows renaming textfield over row cell
public validateItemLabel ( newText: String, renameTextField: TextField, cellIndex: Number ): Boolean
Validates renamed item labels

Field Documentation

cm

public var cm: ContextMenu
Reference to the ContextMenu
ContextMenu; Reference to ContextMenu. You can add or remove the default context menu items easily. You can also show or hide the context menu items dynamically by using the permitContextMenu function.

The contextMenu in the datagrid has an additional method called, "find(caption:String)" that returns the item by matching the item's caption. Each customItem in the customItems array have an additional "action" property that contains one of the dndDataGrid contants, PASTE_INTO, PASTER_AFTER, etc. useful for internal dndDataGrid methods and possibly for your own use. Each item also has a owner property which refers to the datagrid. You must add this property to your own custom menu items when your datagrid is nested in a movieclip.

Do not over write this context menu. It has been enabled to show up from within nested movieclips. If you need to change the menu choices then add or remove items from this existing menu. Examples adding, removing, showing and hiding menu items have been created for you in the examples folder. Please refer to the ContextMenu class documented in the Help Panel for more information on the context menu.

keyPressFunction

public var keyPressFunction: Function
Method to manually handle different key presses
Method to manually handle different key presses. You can use this function to listen to key presses in the datagrid.

pasteItem_Event

public var pasteItem_Event
Event generated after pasteItem method is called
Event generated after pasteItem method is called. The source of the pasted items are from the dndComponent.theCopyItems, dndComponent.theCopyNodes and the dndComponent.theCopyGridItems arrays unless the method is manually called. When the items are cut, copied or removed throught the context menu they are copied into the dndComponent.theCopyItems, dndComponent.theCopyNodes and the dndComponent.theCopyGridItems arrays. If enableCrossDrag property is true then the cut, copied or removed items will be available to any dndComponent that also has their cross drag property enabled.

This event includes the following properties. Target contains a reference to the DataGrid, eventSource contains an internal constant where the call came from (MENU_EVENT, METHOD_CALL or DROP_EVENT), pastePosition contains the location in the target item where the paste occured (PASTE_INTO, PASTE_BEFORE, PASTE_AFTER), targetItem contains the drop target, targetIndex contains the target index, items contains the source items, item contains the source item and cellIndex contains the cell index that the mouse was over when the paste or drop occured. You can listen for a pasteItem or an onPasteItem event.
  • Example:
    The example below adds a listener to the pasteItem event.
    // include delegation class
    import mx.utils.Delegate;
    // Paste Item event function
    function pasteItemEvent(evt) {
    	// reference to the datagrid
    	var theDataGrid = evt.target;
    	// references to all the items and components involved 
    	trace("pastePosition="+evt.pastePosition);
    	trace("thePasteToPosition="+theDataGrid.thePasteToPosition);
    	trace("lastMovedItem="+theDataGrid.lastMovedItem);
    	trace("lastMovedIndex="+theDataGrid.lastMovedIndex);
    	trace("lastMovedSource="+theDataGrid.lastMovedSource);
    	trace("lastMovedItems="+theDataGrid.lastMovedItems);
    	trace("lastMovedIndices="+theDataGrid.lastMovedIndices);
    	trace("lastMovedSources="+theDataGrid.lastMovedSources);
    	trace("selectedItem="+theDataGrid.selectedItem);
    	trace("selectedItems="+theDataGrid.selectedItems);
    	trace("item="+evt.item);
    	trace("items="+evt.items);
    	trace("items="+evt.cellIndex);
    	trace("targetItem="+evt.targetItem);
    	trace("targetIndex="+evt.targetIndex);
    }
    // we add a function that "listens" for the paste event. When a pasteItem event is generated this function gets called. 
    theDataGrid.addEventListener("pasteItem", Delegate.create(this, pasteItemEvent));
    

renameOnDoubleClick

public var renameOnDoubleClick: Boolean
Determines if an item can be renamed on double click
Boolean. Determines if an item can be renamed on the double click event. If enabled then a user can double click on an item and a rename textfield appears. If the enableRenameItem is true then a user can still rename the row through the context menu. Esc cancels the edit. Enter or tab commits the edit. You can use the renameTextRestrict property and validateItemLabel for more control. If you define the labelFunction you may need to redefine the setItemLabel function. You can also disable renaming on double click events and only rename through the context menu. See examples.

Property Documentation


Constructor Documentation


Method Documentation

drawHeaderBG

public function drawHeaderBG (
Void): Void
Draws the header background
Draws the header background. This method is provided for you to customize how the background looks to the user. Example code is shown below.
  • Overrides:
  • Example:
    Here is the original function you can over write:
    function drawHeaderBG() {
    	var mc : MovieClip = header_mc;
    	mc.clear();
    	var clr : Number = getStyle("headerColor");
    	var o : Object = __viewMetrics;
    	var tot : Number = Math.max(totalWidth, displayWidth+3);
    	mc.moveTo(o.left,o.top);
    	var matrix : Object = { matrixType : "box", x:0, y:0, w:tot, h:__headerHeight+1, r:Math.PI/2 };
    	var colors : Array = [clr, clr, 0xffffff];
    	var ratios : Array = [0, 60, 255];
    	var alphas : Array = [100, 100, 100];
    	mc.beginGradientFill("linear", colors, alphas, ratios, matrix);
     
    	mc.lineStyle(0, 0x000000, 0);
    	mc.lineTo(tot, o.top);
    	mc.lineTo(tot, __headerHeight+1);
    	mc.lineStyle(0, 0x000000, 100);
    	mc.lineTo(o.left, __headerHeight+1);
    	mc.lineStyle(0, 0x000000, 0);
    	mc.endFill();
    }
    
  • See also:

drawSeparator

public function drawSeparator (
objPoint,
row,
dragOverPos,
bCanDrop)
Draws separator line when dragging
Draws separator line when dragging. This method is provided for you to customize how the drag and drop looks to the user. Be careful not to do to many things in this function as it is run on every move and can tax the cpu. An interesting method is the row.setState method. This method highlights the row. Example code is shown below.

headerPress

public function headerPress (
Void): Void
Draws the header in the pressed state and moves the cell
Draws the header in the pressed state and moves the cell. This method is provided for you to customize how the header press looks to the user. See also headerPressColor. Example code is shown below.

headerRollOver

public function headerRollOver (
Void): Void
Draws the header overlay with color
Draws the header overlay with color. This method is provided for you to customize how the header rollover looks to the user. See also headerRollOverColor. Example code is shown below.

iconFunction

public function iconFunction (
item,
columnName)
Method to dynamically set the icon of the row
Method to dynamically set the icon of the row. Normally it is set by reading the value of the item's "icon" property. This method will over write any default value. You can return undefined to return the default value. I also recommend you use this function rather than the iconField property or setIcon method for better control and compatibility and cross drag compatibility. You must assign the IconCellRenderer to the column you wish to display the icon in.

pasteItem

public function pasteItem (
theSourceItem,
theTargetItem,
pastePosition,
moveItem,
eventSource,
eventConstant,
cellIndex)
Method to insert or move datagrid items
Method to insert or move datagrid items in the datagrid at specific places. Please use addItem or addItemAt before using this method as this is mostly an internal method. A pasteItem event is generated when this method is called. The event contains the target, which is a reference to the datagrid, the eventSource, which indicates if the method was called from the context menu, the target item and the pastePosition, which indicates the position above, below or in the target item. When items are cut, copied or removed they are copied into the dndComponent.theCopyItems, dndComponent.theCopyNodes and the dndComponent.theCopyGridItems arrays. If enableCrossDrag property is true then the cut, copied or removed items will be available to any dndComponent that also has their cross drag property enabled. When you then paste from the context menu this is where those items come from.

permitContextMenu

public function permitContextMenu (
theItem,
theAction,
theMenuItem,
theContextMenu,
theCellIndex)
A user defined function to display context menu items
A user defined function to show or hide context menu items on an item by item basis. This function is called when the menu is created and allows you to show or hide menu items based on the datagrid item and menu item being passed in. Be aware that the scope changes in this function. The default value returned by this function is true meaning all menu items are shown.
  • Parameters:
    theItem
    Object - The selected item
    theAction
    Number Constant - Reference to a static event variable if one is assigned such as (PASTE_INTO, PASTE_BEFORE, PASTE_AFTER, ADD_ITEM, etc).
    theMenuItem
    ContextMenu - Reference to the context menu
    theContextMenu
    Object - Reference to custom item object
    theCellIndex
    Number - The cell index
  • Returns:
    Boolean
  • Example:
    The code below is the default code in the permitContextMenu function. The code hides the "Paste Into" menu item unless the item is a branch, preventing a user from pasting the copied item into another item.
    theDataGrid.permitContextMenu = function (theItem, theAction, theMenuItem, theContextMenu, theCellIndex) {
    	// "this" keyword does **NOT** reference the datagrid here because we are in a different scope
    	// use the datagrid instance name directly
    	
    	// theDataGrid.PASTE_INTO is a static variable for paste into
    	// if the action is to paste into then we allow it on branch items
    	if (theAction==theDataGrid.PASTE_INTO) {
    		// we are checking if the item we selected is a branch item
    		// if true then we show the "paste into" menu item
    		if (theDataGrid.getIsBranch(theItem)) {
    			return true;
    		}
    		else {
    			return false;
    		}
    	}
    	return true;
    }
     
    // if we define this function we can use it to let the theDataGrid drop INTO another row
    // when a user is dragging over a row that is defined as a branch
    theDataGrid.getIsBranch = function(item){
    	var type = item.data;
    	if (type=="folder") {
    		return true;
    	}
    	return false;
    }
    

permitDropFunction

public function permitDropFunction (
theItem,
theTargetItem,
theAction,
theCellIndex)
A user defined function to allow or prevent drop
A user defined function used to prevent or allow drop. This function is also used for visual feedback when the user is dragging over rows. This default value returned by this function is true. See permissions example.
  • Parameters:
    theItem
    Object - The selected item.
    theTargetItem
    Object - The target item. The item the mouse is over.
    theAction
    Number Constant - The current drag operation. This can be PASTE_INTO, PASTE_AFTER or PASTE_BEFORE.
    theCellIndex
    Number - A number indicating the cell index
  • Returns:
    Boolean
  • Example:
    The example below prevents a user from dropping into anything but a branch item.
    // add items to the datagrid
    // we set the arbitrary fileType property for use in icon function
    theDataGrid.addItem({label:".. ",data:"green",icon:"folder",fileType:"parentFolder"});
    theDataGrid.addItem({label:"Folder 1",data:"red",icon:"folder",fileType:"folder"});
    theDataGrid.addItem({label:"Folder 2",data:"red",icon:"folder",fileType:"folder"});
    theDataGrid.addItem({label:"File 1",data:"blue",icon:"file",fileType:"file"});
    theDataGrid.addItem({label:"File 2",data:"blue",icon:"file",fileType:"file"});
    theDataGrid.addItem({label:"File 3",data:"blue",icon:"file",fileType:"file"});
     
    // the permit drop function is used when dragging and dropping
    theDataGrid.permitDropFunction = function (theSourceItem, theTargetItem, theAction, theCellIndex) {
    	// we are in a different scope. the keyword "this" references the dndDataGrid
    	//trace("theSourceItem ="+theSourceItem.label);
    	//trace("theTargetItem ="+theTargetItem.label);
    	
    	// we are checking if the item we are dragging over is a branch item
    	// we have to define the getIsBranch method to enable dropping into an item.
    	// if true then we can paste into it. if not then no pasty
    	// we return false to prevent a drop from occuring
    	// returning false also shows the "no drop" allowed icon
    	if (this.getIsBranch(theTargetItem)) {
    		// this.PASTE_INTO is a static variable for paste into
    		// if the action is to paste into then we allow it
    		if (theAction==this.PASTE_INTO) {
    			return true;
    		}
    	}
    	// if we are not dragging into the branch we do not allow it
    	return false;
    }
     
    // define the getIsBranch function 
    theDataGrid.getIsBranch = function(item) {
    	// if the item has a property called isBranch and it is true
    	if (item.fileType=="folder") {
    		// this is branch
    		return true;
    	}
    	return false;
    }
    

permitRemove

public function permitRemove (
obj,
menuItem,
menuCaption,
eventType,
cellIndex)
A user defined function to allow a user to cut or remove an item
A user defined function to allow a user to cut or remove an item. You can define this function to pop up an alert prompt similar to windows explorer asking the user if they want to remove or cut the item or you can manually check the item and return false to cancel the operation. See permissions example.
  • Parameters:
    obj
    Object - The datagrid.
    menuItem
    Object - The menuItem.
    menuCaption
    String - The caption of the menu item.
    eventType
    String - The current event operation. This can be REMOVE_ITEM or CUT_ITEM.
    cellIndex
    Number - The cell index
  • Returns:
    Boolean Returns false to prevent cut or remove. Return true to continue cut or remove.
  • Example:
    The example prompts the user before removing the selected item.
    // import the alert contol - add to the library
    import mx.controls.Alert;
     
    // prompt user on remove event
    theDataGrid.permitRemove = function (theDataGrid, menuItem, menuCaption, eventType, cellIndex) {
    	// BE CAREFUL of SCOPE ISSUES HERE
    	var itemLabel = theDataGrid.selectedItem.label;
    	var eventName = "cut";
    	var output = "";
    	// check if this is a remove event
    	if (eventType == theDataGrid.REMOVE_ITEM) {
    		eventName = "remove";
    	}
    	
    	myClickHandler = function (evt) {
    		if (evt.detail == Alert.OK) {
    			theDataGrid.cutItem(theDataGrid.selectedItems, theDataGrid.MENU_EVENT, eventType);
    		}
    	}
    	output = "Are you sure you want to " + eventName + " " + itemLabel + "?";
    	var myAlert = Alert.show(output, "Confirm File Delete", Alert.OK | Alert.CANCEL, _root, myClickHandler, "stockIcon", Alert.OK);
    	return false;
    }
    

permitRename

public function permitRename (
theItem,
cellIndex,
eventSource)
A user defined function to allow rename on a item
A user defined function to show the rename/edit textfield on an item. This is different than the datagrid editable property. It is an alternative that might better suit your needs. If this function returns false then no rename textfield will be shown for the selected item. This is useful if you do not want to show a rename textfield on specific items such as the branch items. You can also show rename fields on specific cells. You would check the cell index to find the cell they pressed. You can change the "Rename Item" text in the context menu to "Edit Item" or something similar using the strRenameItem property. If you want to prevent the "Rename Item" in the context menu use permitContextMenu function.

The documentation was generated from the following file:
  • dndDataGrid.as, Last Modified: 6/7/2006 10:46:56 PM