Version

FixedStateChanging Property

Event fired before a column is fixed or unfixed.

This event is cancelable.

Syntax
'Declaration
 
Public Property FixedStateChanging As String
public string FixedStateChanging {get; set;}
Example
WebDataGrid1.Behaviors.ColumnFixing.ColumnFixingClientEvents.FixedStateChanging = "WebDataGrid_FixedStateChanging"
WebDataGrid1.Behaviors.ColumnFixing.ColumnFixingClientEvents.FixedStateChanging = "WebDataGrid_FixedStateChanging";
// The client event 'FixedStateChanging' takes two parameters sender and e
// sender  is the object which is raising the event
// e is the FixingEventArgs

function WebDataGrid_FixedStateChanging(sender, e) {

        //Gets the column object you want to fix/unfix
        var fixedColumn = e.get_fixedColumn();

        //Gets the column key
        var key = fixedColumn.get_column().get_key();

        //Checks if the column is fixed or unfixed 
        if(!e.get_isFixed())
        {
              //Gets the location where the column is going to be fixed (0 for left and 1 for right)
              var fixLocation = fixedColumn.get_fixLocation();
        
             if (fixLocation == 0) {

                    if (!confirm("Are you sure you want to fix the column '" + key + "' to the left?"))

                    //Stops the column to be fixed
                    e.set_cancel(true);

              }
              else 
              {
                  if (!confirm("Are you sure you want to fix the column '" + key + "' to the right?"))

                       //Stops the column to be fixed
                       e.set_cancel(true);

              }

        }   
        else
        {
             if(!confirm("Are you sure you want to unfix the column '" + key +"'?"))
             
                   //Stops the column to be unfixed
                   e.set_cancel(true); 
             else
                   alert("Column '"+ key +"' is unfixing");
         }
   }
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