Exemplo n.º 1
0
        public void HandleMouseEnter(EventData e, object item)
        {
            OnCellChangedEventData cell = (OnCellChangedEventData)(object)_grid.GetCellFromEvent(e);
            if (cell != null)
            {
                _mouseOut = false;
                Entity entityRow = (Entity)_grid.GetDataItem(cell.Row);
                if (entityRow != null)
                {
                    Script.Literal("{0}.getGridPosition()", _grid);
                    int viewPortRight = _grid.GetViewport().RightPx;
                    int viewPortLeft = _grid.GetViewport().LeftPx;

                    jQueryObject node = jQuery.Select((string)Script.Literal("{0}.getCellNode({1},{2})", _grid, cell.Row, cell.Cell));
                    int buttonsWidth = _hoverButtons.GetWidth();
                    int x = node.Parent().GetWidth();
                    if (viewPortRight < x+buttonsWidth)
                        x = viewPortRight - buttonsWidth ;
                    int y = 0;

                    node.Parent().Append(_hoverButtons);
                    _hoverButtons.CSS("left", x.ToString() + "px");
                    _hoverButtons.CSS("top", y.ToString() + "px");
                    _hoverButtons.CSS("display", "block");
                    _hoverButtons.Attribute("rowId", entityRow.Id.ToString());
                }
            }
        }
Exemplo n.º 2
0
        public void HandleMouseLeave(EventData e, object item)
        {
            _mouseOut = true;
            Window.SetTimeout(delegate()
            {
                if (_mouseOut)
                    _hoverButtons.FadeOut();


            }, 500);
        }
Exemplo n.º 3
0
 private void Connections_OnDataLoaded(EventData e, object data)
 {
     DataLoadedNotifyEventArgs args = (DataLoadedNotifyEventArgs) data;
    
     for (int i=0; i<args.To;i++)
     {
         Connection connection = (Connection)Connections.GetItem(i);
         if (connection==null)
             return;
         connection.PropertyChanged+=connection_PropertyChanged;
     }
 }
Exemplo n.º 4
0
        public void HandleGridClick(EventData e, object a) {
            CellSelection args = (CellSelection)a;

            object item = _grid.GetDataItem(args.Row.Value);
            if (item.GetType()==typeof(Group))
            {
                IGroupedDataView dataView = (IGroupedDataView)_grid.GetData();
                Group group = (Group)item;
                if (group.Collapsed)
                {
                   dataView.ExpandGroup(group.GroupingKey);
                }
                else
                {
                    dataView.CollapseGroup(group.GroupingKey);
                }
                e.StopImmediatePropagation();
                e.PreventDefault();
            }
           
        }
Exemplo n.º 5
0
 public jQueryObject GetCellFromEvent(EventData e)
 {
     return null;
 }
Exemplo n.º 6
0
        public void Notify(object args,EventData e, object scope)
        {

        }