Class RadGanttView
Displays a hierarchical collection of task items along with the relations between them. Each item is represented by a Gantt
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
[TelerikToolboxCategory("Data Controls")]
public class RadGanttView : RadControl, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IPCHost, IAnalyticsProvider, IPrintable
Constructors
RadGanttView()
Declaration
public RadGanttView()
Fields
bitmapCreated
Declaration
protected bool bitmapCreated
Field Value
System.
|
colCount
Declaration
protected int colCount
Field Value
System.
|
drawArea
Declaration
protected RectangleF drawArea
Field Value
System.
|
printBmp
Declaration
protected Bitmap printBmp
Field Value
System.
|
rowCount
Declaration
protected int rowCount
Field Value
System.
|
timelineBmp
Declaration
protected Bitmap timelineBmp
Field Value
System.
|
Properties
AllowSummaryEditing
Gets or sets a value indicating whether summary items are editable by the user or their value is auto-calculated from their sub items.
Declaration
public bool AllowSummaryEditing { get; set; }
Property Value
System.
|
BackColor
RadGanttView consists of multiple visual elements and separate settings are provided to customize their appearance. Current BackColor property might be ignored.
Declaration
public override Color BackColor { get; set; }
Property Value
System.
|
Overrides
ChildMember
Gets or sets a property name which will be used to define a relation of the data items.
Declaration
public string ChildMember { get; set; }
Property Value
System.
|
Columns
Gets the collection of columns shown in the Gantt
Declaration
public GanttViewTextViewColumnCollection Columns { get; }
Property Value
Gantt The columns. |
CurrentColumn
Gets or sets the current column.
Declaration
public GanttViewTextViewColumn CurrentColumn { get; set; }
Property Value
DataProvider
Gets or sets a IGantt
Declaration
public IGanttViewDataProvider DataProvider { get; set; }
Property Value
IGantt The data provider. |
DataSource
Gets or sets the data source that the Rad
Declaration
public object DataSource { get; set; }
Property Value
System.
|
DefaultSize
Gets the default size of the control.
Declaration
protected override Size DefaultSize { get; }
Property Value
System. The default System. |
DragDropService
Gets or sets the drag drop service.
Declaration
public GanttViewDragDropService DragDropService { get; set; }
Property Value
Gantt The drag drop service. |
EnableCustomPainting
Gets or sets a value indicating whether custom painting is enabled.
Declaration
public bool EnableCustomPainting { get; set; }
Property Value
System.
|
EndMember
Gets or sets a property name which will be used to extract the end of the data items.
Declaration
public string EndMember { get; set; }
Property Value
System.
|
ForeColor
RadGanttView consists of multiple visual elements and separate settings are provided to customize their appearance. Current ForeColor property might be ignored.
Declaration
public override Color ForeColor { get; set; }
Property Value
System.
|
Overrides
GanttViewBehavior
Gets or sets the gantt view behavior.
Declaration
public BaseGanttViewBehavior GanttViewBehavior { get; set; }
Property Value
Base The gantt view behavior. |
GanttViewElement
Gets the gantt view element.
Declaration
public RadGanttViewElement GanttViewElement { get; }
Property Value
Rad The gantt view element. |
HeaderHeight
Gets or sets the height of the header row and the timeline container.
Declaration
public int HeaderHeight { get; set; }
Property Value
System. The height of the header. |
IsDataBound
Gets a value indicating whether this instance is data bound.
Declaration
public bool IsDataBound { get; }
Property Value
System.
|
IsEditing
Gets a value indicating whether this instance is in edit mode.
Declaration
public bool IsEditing { get; }
Property Value
System.
|
IsInDesignMode
Gets or a value indicating whether the control is in design mode.
Declaration
public bool IsInDesignMode { get; }
Property Value
System.
|
ItemHeight
Gets or sets the height of the items.
Declaration
public int ItemHeight { get; set; }
Property Value
System. The height of the item. |
Items
Gets the collection of task items.
Declaration
public GanttViewDataItemCollection Items { get; }
Property Value
Gantt The task items. |
LinkDataMember
Gets or sets the name of the list or table in the data source from which the Rad
Declaration
public string LinkDataMember { get; set; }
Property Value
System.
|
LinkEndMember
Gets or sets a property name which will be used to extract the links end item.
Declaration
public string LinkEndMember { get; set; }
Property Value
System.
|
Links
Gets the collection of links.
Declaration
public GanttViewLinkDataItemCollection Links { get; }
Property Value
Gantt The links. |
LinkStartMember
Gets or sets a property name which will be used to extract links start item.
Declaration
public string LinkStartMember { get; set; }
Property Value
System.
|
LinkTypeConverter
Gets or sets a link type converter that will be used to convert values coming from the data source to Tasks
Declaration
public LinkTypeConverter LinkTypeConverter { get; set; }
Property Value
Link The link type converter. |
LinkTypeMember
Gets or sets a property name which will be used to extract the link type of the data items.
Declaration
public string LinkTypeMember { get; set; }
Property Value
System.
|
ParentMember
Gets or sets a property name which will be used to define a relation of the data items.
Declaration
public string ParentMember { get; set; }
Property Value
System.
|
PrintSettings
Gets or sets a Gantt
Declaration
public GanttViewPrintSettings PrintSettings { get; set; }
Property Value
Gantt The print settings. |
ProgressMember
Gets or sets a property name which will be used to extract the Progress of the data items.
Declaration
public string ProgressMember { get; set; }
Property Value
System.
|
RadContextMenu
Gets or sets the context menu associated with the control.
Declaration
public virtual RadContextMenu RadContextMenu { get; set; }
Property Value
Rad A System. |
Ratio
Gets or sets the ratio between the text view and the graphical view.
Declaration
public float Ratio { get; set; }
Property Value
System. The ratio. |
ReadOnly
Gets or sets a value indicating whether the gantt view is read only.
Declaration
public bool ReadOnly { get; set; }
Property Value
System.
|
SelectedItem
Gets or sets the selected item.
Declaration
public GanttViewDataItem SelectedItem { get; set; }
Property Value
Gantt The selected item. |
SelectedLink
Gets or sets the selected link.
Declaration
public GanttViewLinkDataItem SelectedLink { get; set; }
Property Value
Gantt The selected link. |
ShowTimelineTodayIndicator
Gets or sets a value indicating whether to show the timeline today indicator.
Declaration
public bool ShowTimelineTodayIndicator { get; set; }
Property Value
System.
|
ShowTodayIndicator
Gets or sets a value indicating whether to show the today indicator.
Declaration
public bool ShowTodayIndicator { get; set; }
Property Value
System.
|
SplitterWidth
Gets or sets the width of the splitter.
Declaration
public int SplitterWidth { get; set; }
Property Value
System. The width of the splitter. |
StartMember
Gets or sets a property name which will be used to extract the start of the data items.
Declaration
public string StartMember { get; set; }
Property Value
System.
|
TaskDataMember
Gets or sets the name of the list or table in the data source from which the Rad
Declaration
public string TaskDataMember { get; set; }
Property Value
System.
|
Text
This property is not relevant for this class.
Declaration
public override string Text { get; set; }
Property Value
System.
|
Overrides
TitleMember
Gets or sets a property name which will be used to extract the title of the data items.
Declaration
public string TitleMember { get; set; }
Property Value
System.
|
Methods
BeginPrint(RadPrintDocument, PrintEventArgs)
Called when the printing begins.
Declaration
public int BeginPrint(RadPrintDocument sender, PrintEventArgs args)
Parameters
Rad The |
System. The event args. |
Returns
System. The number of pages that will be printed. |
Implements
BeginUpdate()
Disables all notifications in the RadGanttView
Declaration
public void BeginUpdate()
CreateChildItems(RadElement)
Creates the child items.
Declaration
protected override void CreateChildItems(RadElement parent)
Parameters
Rad The parent. |
Overrides
CreateGanttViewElement()
Creates the Rad
Declaration
protected virtual RadGanttViewElement CreateGanttViewElement()
Returns
Dispose(Boolean)
Declaration
protected override void Dispose(bool disposing)
Parameters
System.
|
Overrides
DrawCurrentPage(Graphics, Int32)
Draws the current page by slicing a portion of the big bitmap.
Declaration
protected virtual void DrawCurrentPage(Graphics g, int printedPage)
Parameters
System. The graphics object. |
System. The printed page. |
DrawHeaderAndTimelineViewToBitmap(Bitmap)
Draws the header and the timeline view items to bitmap.
Declaration
protected virtual void DrawHeaderAndTimelineViewToBitmap(Bitmap bmp)
Parameters
System. The BMP. |
DrawHeaderCellsToBitmap(Graphics)
Draws the header cells to bitmap.
Declaration
protected virtual void DrawHeaderCellsToBitmap(Graphics g)
Parameters
System. The g. |
DrawLinksToBitmap(Graphics)
Draws the links to the bitmap.
Declaration
protected virtual void DrawLinksToBitmap(Graphics g)
Parameters
System. The g. |
DrawTextViewAndGraphicalViewToBitmap(Bitmap)
Draws the grid portion of the gantt view and the graphical view to the big bitmap.
Declaration
protected virtual void DrawTextViewAndGraphicalViewToBitmap(Bitmap bmp)
Parameters
System. The BMP. |
DrawTextViewCellsAndTasksToBitmap(Graphics)
Draws the grid cells and graphical tasks to the bitmap.
Declaration
protected virtual void DrawTextViewCellsAndTasksToBitmap(Graphics g)
Parameters
System. The graphics. |
DrawTimelineItemsToBitmap(Graphics)
Draws the timeline items to bitmap.
Declaration
protected virtual void DrawTimelineItemsToBitmap(Graphics g)
Parameters
System. The g. |
EndPrint(RadPrintDocument, PrintEventArgs)
Called when the printing ends.
Declaration
public bool EndPrint(RadPrintDocument sender, PrintEventArgs args)
Parameters
Rad The |
System. The event args. |
Returns
System. false if the printing was canceled |
Implements
EndUpdate()
Ends the update.
Declaration
public void EndUpdate()
GetElementShape(GanttViewPrintElementContext, RectangleF)
Gets the shape of an element based on the print context and the provided rectangle.
Declaration
protected virtual PointF[] GetElementShape(GanttViewPrintElementContext context, RectangleF rect)
Parameters
Gantt The context. |
System. The rect. |
Returns
System.
|
GetFinishToFinishLines(GanttViewLinkDataItem, Int32, Int32)
Gets the finish to finish lines for the given link.
Declaration
protected virtual List<PointF> GetFinishToFinishLines(GanttViewLinkDataItem link, int startItemIndex, int endItemIndex)
Parameters
Gantt The link. |
System. The index of the link start item in a flat representation of the items hierarchy. |
System. The index of the link end item in a flat representation of the items hierarchy. |
Returns
System.
|
GetFinishToStartLines(GanttViewLinkDataItem, Int32, Int32)
Gets the finish to start lines for the given link.
Declaration
protected virtual List<PointF> GetFinishToStartLines(GanttViewLinkDataItem link, int startItemIndex, int endItemIndex)
Parameters
Gantt The link. |
System. The index of the link start item in a flat representation of the items hierarchy. |
System. The index of the link end item in a flat representation of the items hierarchy. |
Returns
System.
|
GetLinkLines(GanttViewLinkDataItem, Int32, Int32)
Gets the link lines for the given link.
Declaration
protected virtual List<PointF> GetLinkLines(GanttViewLinkDataItem link, int startItemIndex, int endItemIndex)
Parameters
Gantt The link. |
System. The index of the link start item in a flat representation of the items hierarchy. |
System. The index of the link end item in a flat representation of the items hierarchy. |
Returns
System.
|
GetPrintElement(GanttViewPrintElementContext)
Gets an initialized print element based on the provided context.
Declaration
protected virtual GanttViewPrintElement GetPrintElement(GanttViewPrintElementContext context)
Parameters
Gantt The context. |
Returns
GetPrintRectangle(GanttViewDataItem, Int32)
Returns a rectangle representing the coordinates where an object should be positioned or drawn for the given item and time frame.
Declaration
protected virtual RectangleF GetPrintRectangle(GanttViewDataItem item, int index)
Parameters
Gantt The item that will be printed. |
System. The index of the item in a flat representation of the items hierarchy. |
Returns
System.
|
GetSettingsDialog(RadPrintDocument)
Gets a print settings dialog that is specific for the printable object.
Declaration
public Form GetSettingsDialog(RadPrintDocument document)
Parameters
Rad The |
Returns
System. The dialog. |
Implements
GetStartToFinishLines(GanttViewLinkDataItem, Int32, Int32)
Gets the start to finish lines for the given link.
Declaration
protected virtual List<PointF> GetStartToFinishLines(GanttViewLinkDataItem link, int startItemIndex, int endItemIndex)
Parameters
Gantt The link. |
System. The index of the link start item in a flat representation of the items hierarchy. |
System. The index of the link end item in a flat representation of the items hierarchy. |
Returns
System.
|
GetStartToStartLines(GanttViewLinkDataItem, Int32, Int32)
Gets the start to start lines for the given link.
Declaration
protected virtual List<PointF> GetStartToStartLines(GanttViewLinkDataItem link, int startItemIndex, int endItemIndex)
Parameters
Gantt The link. |
System. The index of the link start item in a flat representation of the items hierarchy. |
System. The index of the link end item in a flat representation of the items hierarchy. |
Returns
System.
|
IsInputKey(Keys)
Determines whether the pressed key is input key.
Declaration
protected override bool IsInputKey(Keys keyData)
Parameters
System. The key data. |
Returns
System.
|
Overrides
OnBindingContextChanged(EventArgs)
Raises the Binding
Declaration
protected override void OnBindingContextChanged(EventArgs e)
Parameters
System. The System. |
Overrides
OnKeyDown(KeyEventArgs)
Raises the Key
Declaration
protected override void OnKeyDown(KeyEventArgs e)
Parameters
System. The System. |
Overrides
OnKeyPress(KeyPressEventArgs)
Raises the Key
Declaration
protected override void OnKeyPress(KeyPressEventArgs e)
Parameters
System. The System. |
Overrides
OnKeyUp(KeyEventArgs)
Raises the Key
Declaration
protected override void OnKeyUp(KeyEventArgs e)
Parameters
System. The System. |
Overrides
OnMouseClick(MouseEventArgs)
Raises the System.
Declaration
protected override void OnMouseClick(MouseEventArgs e)
Parameters
System. An System. |
OnMouseDoubleClick(MouseEventArgs)
Raises the System.
Declaration
protected override void OnMouseDoubleClick(MouseEventArgs e)
Parameters
System. An System. |
OnMouseDown(MouseEventArgs)
Raises the Mouse
Declaration
protected override void OnMouseDown(MouseEventArgs e)
Parameters
System. The System. |
Overrides
OnMouseEnter(EventArgs)
Raises the Mouse
Declaration
protected override void OnMouseEnter(EventArgs e)
Parameters
System. The System. |
Overrides
OnMouseHover(EventArgs)
Raises the Mouse
Declaration
protected override void OnMouseHover(EventArgs e)
Parameters
System. The System. |
Overrides
OnMouseLeave(EventArgs)
Raises the Mouse
Declaration
protected override void OnMouseLeave(EventArgs e)
Parameters
System. The System. |
Overrides
OnMouseMove(MouseEventArgs)
Raises the Mouse
Declaration
protected override void OnMouseMove(MouseEventArgs e)
Parameters
System. The System. |
Overrides
OnMouseUp(MouseEventArgs)
Raises the Mouse
Declaration
protected override void OnMouseUp(MouseEventArgs e)
Parameters
System. The System. |
Overrides
OnMouseWheel(MouseEventArgs)
Raises the Mouse
Declaration
protected override void OnMouseWheel(MouseEventArgs e)
Parameters
System. The System. |
Overrides
OnPrintElementFormatting(GanttViewPrintElementFormattingEventArgs)
Raises the Print
Declaration
protected virtual void OnPrintElementFormatting(GanttViewPrintElementFormattingEventArgs e)
Parameters
Gantt The Gantt |
OnPrintElementPaint(GanttViewPrintElementPaintEventArgs)
Raises the Print
Declaration
protected virtual void OnPrintElementPaint(GanttViewPrintElementPaintEventArgs e)
Parameters
Gantt The Gantt |
Print()
Print(Boolean)
Directly prints the Rad
Declaration
public virtual void Print(bool showPrinterSettings)
Parameters
System. Indicates whether printer settings dialog should be shown. |
Print(Boolean, RadPrintDocument)
Directly prints the Rad
Declaration
public virtual void Print(bool showPrinterSettings, RadPrintDocument document)
Parameters
System. Indicates whether printer settings dialog should be shown. |
Rad As instance of Rad |
PrintGanttViewElement(Graphics, GanttViewPrintElementContext, RectangleF, String, Object)
Prints a gantt view element to the graphics object.
Declaration
protected virtual void PrintGanttViewElement(Graphics g, GanttViewPrintElementContext context, RectangleF rect, string text, object dataItem)
Parameters
System. The Graphics object used for painting the element. |
Gantt The print element context. |
System. The rectangle of the print element. |
System. The text of the print element. |
System. The data item of the print element. |
PrintGanttViewElement(Graphics, GanttViewPrintElementContext, RectangleF, String, Object, String)
Prints a gantt view element to the graphics object.
Declaration
protected virtual void PrintGanttViewElement(Graphics g, GanttViewPrintElementContext context, RectangleF rect, string text, object dataItem, string columnName)
Parameters
System. The Graphics object used for painting the element. |
Gantt The print element context. |
System. The rectangle of the print element. |
System. The text of the print element. |
System. The data item of the print element. |
System. The column name of the print element. |
PrintPage(Int32, RadPrintDocument, PrintPageEventArgs)
Prints the page with the specified number.
Declaration
public bool PrintPage(int pageNumber, RadPrintDocument sender, PrintPageEventArgs args)
Parameters
System. The number of the current page. |
Rad The |
System. The event args. |
Returns
System. true if there are more pages, false otherwise |
Implements
PrintPreview()
Shows a Rad
Declaration
public virtual void PrintPreview()
PrintPreview(RadPrintDocument)
Shows a Rad
Declaration
public virtual void PrintPreview(RadPrintDocument document)
Parameters
Rad As instance of Rad |
ProcessDialogKey(Keys)
Processes a dialog key.
Declaration
protected override bool ProcessDialogKey(Keys keyData)
Parameters
System. One of the System. |
Returns
System. true if the key was processed by the control; otherwise, false. |
WndProc(ref Message)
Handles windows messages.
Declaration
protected override void WndProc(ref Message m)
Parameters
System. The message. |
Overrides
Events
ContextMenuOpening
Occurs when a context menu is about to be opened.
Declaration
public event GanttViewContextMenuOpeningEventHandler ContextMenuOpening
Event Type
CreateDataItem
Occurs when a new data item is created.
Declaration
public event CreateGanttDataItemEventHandler CreateDataItem
Event Type
CreateLinkDataItem
Occurs when a new link data item is created.
Declaration
public event CreateGanttLinkDataItemEventHandler CreateLinkDataItem
Event Type
DataCellElementCreating
Occurs when a new data cell element needs to be created.
Declaration
public event GanttViewDataCellElementCreatingEventHandler DataCellElementCreating
Event Type
GraphicalViewItemFormatting
Occurs when the state of an item in the Gantt
Declaration
public event GanttViewGraphicalViewItemFormattingEventHandler GraphicalViewItemFormatting
Event Type
GraphicalViewLinkItemFormatting
Occurs when the state of a link item in the Gantt
Declaration
public event GanttViewLinkItemFormattingEventHandler GraphicalViewLinkItemFormatting
Event Type
HeaderCellElementCreating
Occurs when a new header cell element needs to be created.
Declaration
public event GanttViewHeaderCellElementCreatingEventHandler HeaderCellElementCreating
Event Type
ItemAdded
Occurs when a new item is added to the Items collection.
Declaration
public event GanttViewItemAddedEventHandler ItemAdded
Event Type
ItemAdding
Occurs before an Gantt
Declaration
public event GanttItemAddingEventHandler ItemAdding
Event Type
ItemChanged
Occurs when an item's property is changed.
Declaration
public event GanttViewItemChangedEventhandler ItemChanged
Event Type
ItemChildIdNeeded
Occurs when an item needs an id for storing in data sources.
Declaration
public event GanttViewItemChildIdNeededEventHandler ItemChildIdNeeded
Event Type
ItemDataBound
Occurs when an item is data bound.
Declaration
public event GanttViewItemDataBoundEventHandler ItemDataBound
Event Type
ItemDataError
Occurs when there is an error in the data layer of RadGanttView related to data operations with Item objects.
Declaration
public event GanttItemDataErrorEventHandler ItemDataError
Event Type
ItemElementCreating
Occurs when an item element needs to be created.
Declaration
public event GanttViewItemElementCreatingEventHandler ItemElementCreating
Event Type
ItemExpandedChanged
Occurs after an item is expanded or collapsed.
Declaration
public event GanttViewExpandedChangedEventHandler ItemExpandedChanged
Event Type
ItemExpandedChanging
Occurs when an item is about to be expanded or collapsed.
Declaration
public event GanttViewExpandedChangingEventHandler ItemExpandedChanging
Event Type
ItemPaint
Occurs when an item is painted. Allows custom painting over the item. EnableCustomPainting must be set to true for this event to be fired.
Declaration
public event GanttViewItemPaintEventHandler ItemPaint
Event Type
ItemRemoved
Occurs when an item removed from the Items collection.
Declaration
public event GanttViewItemRemovedEventHandler ItemRemoved
Event Type
LinkAdded
Occurs when a new link added to the Links collection.
Declaration
public event GanttViewLinkAddedEventHandler LinkAdded
Event Type
LinkAdding
Occurs before an Gantt
Declaration
public event GanttLinkAddingEventHandler LinkAdding
Event Type
LinkChanged
Occurs when a link's property is changed.
Declaration
public event GanttViewLinkChangedEventHandler LinkChanged
Event Type
LinkDataBound
Occurs when a link is data bound.
Declaration
public event GanttViewLinkDataBoundEventHandler LinkDataBound
Event Type
LinkDataError
Occurs when there is an error in the data layer of RadGanttView related to data operations with Link objects.
Declaration
public event GanttLinkDataErrorEventHandler LinkDataError
Event Type
LinkRemoved
Occurs when a link is removed from the Links collection.
Declaration
public event GanttViewLinkRemovedEventHandler LinkRemoved
Event Type
PrintElementFormatting
Occurs when an element will be printed. Allows formatting of the element.
Declaration
public event GanttViewPrintElementFormattingEventHandler PrintElementFormatting
Event Type
PrintElementPaint
Occurs after an element is printed. Allows for custom painting over the element.
Declaration
public event GanttViewPrintElementPaintEventHandler PrintElementPaint
Event Type
SelectedItemChanged
Occurs when selected item has been changed.
Declaration
public event GanttViewSelectedItemChangedEventHandler SelectedItemChanged
Event Type
SelectedItemChanging
Occurs when the selected item is about to be changed.
Declaration
public event GanttViewSelectedItemChangingEventHandler SelectedItemChanging
Event Type
SelectedLinkChanged
Occurs when selected link has been changed.
Declaration
public event GanttViewSelectedLinkChangedEventHandler SelectedLinkChanged
Event Type
SelectedLinkChanging
Occurs when the selected link is about to be changed.
Declaration
public event GanttViewSelectedLinkChangingEventHandler SelectedLinkChanging
Event Type
TextViewCellFormatting
Occurs when the content of a cell needs to be formatted for display.
Declaration
public event GanttViewTextViewCellFormattingEventHandler TextViewCellFormatting
Event Type
TextViewItemFormatting
Occurs when an item in the Gantt
Declaration
public event GanttViewTextViewItemFormattingEventHandler TextViewItemFormatting
Event Type
TimelineItemElementCreating
Occurs when a timeline item element needs to be created.
Declaration
public event GanttViewTimelineItemElementCreatingEventHandler TimelineItemElementCreating
Event Type
TimelineItemFormatting
Occurs when the state of a timeline item changes and it needs to be formatted.
Declaration
public event GanttViewTimelineItemFormattingEventHandler TimelineItemFormatting