// Set the specified cell int he specified position public override void SetCell( int row, int col, SourceGrid2.Cells.ICellVirtual cell ) { throw new ApplicationException( "Cannot set cell for this kind of grid" ); }
// Get the value of the cell at the specified position public override object GetValue( SourceGrid2.Position position ) { return array.GetValue( position.Row - Grid.FixedRows, position.Column - Grid.FixedColumns ); }
// Set the value of the cell at the specified position public override void SetValue( SourceGrid2.Position position, object val ) { array.SetValue( val, position.Row - Grid.FixedRows, position.Column - Grid.FixedColumns ); OnValueChanged( new SourceGrid2.PositionEventArgs( position, this ) ); }
// Get the value of the cell at the specified position public override object GetValue( SourceGrid2.Position position ) { return null; }
// Set the value of the cell at the specified position public override void SetValue( SourceGrid2.Position position, object val ) { throw new ApplicationException( "Cannot change this kind of cell" ); }
// Set sort status public override void SetSortMode( SourceGrid2.Position position, SourceGrid2.GridSortMode mode ) { }
// Get the value of the cell at the specified position public override object GetValue( SourceGrid2.Position position ) { return position.Row - Grid.FixedRows; }
// Get sort status public override SourceGrid2.SortStatus GetSortStatus( SourceGrid2.Position position ) { return new SourceGrid2.SortStatus( SourceGrid2.GridSortMode.None, false ); }
// Get the value of the cell at the specified position public override object GetValue( SourceGrid2.Position position ) { return position.Column - Grid.FixedColumns; }
/// <summary> /// Sets the currently selected log entry and enables the properties /// button. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void gridLog_FocusRowEntered(object sender, SourceGrid2.RowEventArgs e) { btnProperties.Enabled = gridLog.Selection.SelectedRows.Length == 1; m_selectedentry = (FlashLogEntry) e.Row.Tag; }
/// <summary> /// Fired when a "View" cell in the property grid is clicked. /// /// This will request object data from the client. /// </summary> /// <param name="sender"></param> /// <param name="args"></param> private void gridProperties_ViewCellClick(object sender, SourceGrid2.PositionEventArgs args) { FlashObject obj = gridProperties.Rows[args.Position.Row].Tag as FlashObject; // // Set the selected object (so that treeObjects_AfterSelect and // treeObjects_AfterExpand don't trigger manager calls. // m_selectedObject = obj; // // Select and expand the node. // m_selectedObject.TreeNode.Expand(); // // Set the wait cursor (to block input). // Cursor.Current = Cursors.WaitCursor; // // Request the object's properties from the client. // m_objmanager.RequestObjectProperties(obj.Path, new ObjectManager.ObjectRecievedHandler(objManager_ObjectRecieved)); string path = obj.Path.ToString(); // // Add it to the recent objects list if it isn't already there. // if (!lstRecentObjects.Items.Contains(path)) lstRecentObjects.Items.Add(path); treeObjects.SelectedNode = obj.TreeNode; }
private void gridProperties_ExecuteCellClick(object sender, SourceGrid2.PositionEventArgs args) { FlashObject obj = gridProperties.Rows[args.Position.Row].Tag as FlashObject; MethodExecuteForm execute = new MethodExecuteForm(); // // If OK was pressed, execute the method. // if (execute.ShowDialog(this) == DialogResult.OK) { } execute.Dispose(); }