Beispiel #1
0
 /// <summary>
 /// Invoking BeginningDrag Event if specified
 /// </summary>
 /// <param name="args"></param>
 protected virtual void OnBeginningDrag(BeginningDragEventArgs args)
 {
     if (this.BeginningDrag != null)
     {
         this.BeginningDrag(this, args);
     }
 }
Beispiel #2
0
        /// <summary>
        /// Initiate Drag Process in the DragQuery Event Handler
        /// </summary>
        /// <param name="gridView">RadGridView object</param>
        /// <param name="dragDropArgs">DragDropQueryEventArgs object</param>
        /// <returns>
        /// <value = "True">DragEvent successfully initiated</value>
        /// <value = "False">DragEvent cancelled</value>
        /// </returns>
        private bool InitiateDrag(RadGridView gridView, DragDropQueryEventArgs dragDropArgs)
        {
            var itemsToDrag = this.GetItemsToReorder(gridView);
            var eventArgs   = new BeginningDragEventArgs(gridView, itemsToDrag);

            this.OnBeginningDrag(eventArgs);
            if (!eventArgs.Cancel)
            {
                dragDropArgs.Options.Payload = itemsToDrag;
                this.OnDragStarted(new DragStartedEventArgs(gridView, itemsToDrag));
            }
            return(!eventArgs.Cancel);
        }