Version

ColumnSelectionChanging Property

Event fired before a Column's selection changes.

This event is cancelable.

Syntax
'Declaration
 
Public Property ColumnSelectionChanging As String
public string ColumnSelectionChanging {get; set;}
Example
Me.WebDataGrid1.Behaviors.Selection.SelectionClientEvents.ColumnSelectionChanging = "WDG1_ColumnSelectionChanging"
this.WebDataGrid1.Behaviors.Selection.SelectionClientEvents.ColumnSelectionChanging = "WDG1_ColumnSelectionChanging";
// The client event ColumnSelectionChanging takes two parameters sender and e
// sender  is the object which is raising the event
// e is the ColumnSelectionChangingEventArgs

   function WDG1_ColumnSelectionChanging(sender, e) {

       //Returns a Read Only collection of the currently selected columns
       var currentSelectedColumns = e.getCurrentSelectedColumns();

       //Returns the number of columns in the collection
       var currentLength = currentSelectedColumns.get_length();

       //Returns a Read Only collection of the newly selected columns
       var newSelectedColumns = e.getNewSelectedColumns();

       var newLength = newSelectedColumns.get_length();

       window.status = "The number of columns selected changed from '" + currentLength + "' to '" + newLength + "'";
   
   
   }
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also