バージョン

FixedStateChanging プロパティ

列が固定/固定解除される前に発生するイベント。

このイベントはキャンセルできます。

シンタックス
'宣言
 
Public Property FixedStateChanging As String
public string FixedStateChanging {get; set;}
使用例
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");
         }
   }
参照