Ejemplo n.º 1
0
 protected void RaiseExpanded(ExpandCollapseEventArgs e)
 {
     if (this.Expanded != null)
     {
         this.Expanded(this, e);
     }
 }
Ejemplo n.º 2
0
        private void OnCollapsed(object sender, Telerik.Data.Core.Layouts.ExpandCollapseEventArgs e)
        {
            // NOTE: Consider removing this code for better performance once we use more complex IndexTree with nested IndexTrees for every Group.
            // This way we won't need to update the index tree on Expand/Collapse.
            int end = e.StartSlot + e.SlotsCount;

            for (int i = e.StartSlot; i < end; i++)
            {
                this.Layout.RenderInfo.Update(i, 0);
            }

            this.owner.InvalidateCellsPanelMeasure();
        }
Ejemplo n.º 3
0
        private void OnExpanded(object sender, Telerik.Data.Core.Layouts.ExpandCollapseEventArgs e)
        {
            // NOTE: Consider removing this code for better performance once we use more complex IndexTree with nested IndexTrees for every Group.
            // This way we won't need to update the index tree on Expand/Collapse operation and we won't have to use GetNextVisible method.
            int end = e.StartSlot + e.SlotsCount;

            for (int i = e.StartSlot; i < end; i = this.layout.GetNextVisibleSlot(i))
            {
                this.Layout.RenderInfo.Update(i, this.isHorizontal ? GridModel.DefaultColumnWidth : GridModel.DefaultRowHeight);
            }

            // Gets the length up to (including) the index of expanded item.
            var physicalOffset = this.Layout.RenderInfo.ValueForIndex(e.StartSlot - 1);

            this.owner.InvalidateCellsPanelMeasure();
        }