Class GridViewHelper
Provides helper methods for RadGridView. This class is used internally.
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.GridView.dll
Syntax
public class GridViewHelper
Constructors
GridViewHelper()
Declaration
public GridViewHelper()
Methods
AutoGenerateGridColumn(Type, ISite)
Generates automatically the grid column.
Declaration
public static GridViewDataColumn AutoGenerateGridColumn(Type columnType, ISite site)
Parameters
System.Type
columnType
Type of the column. |
System.ComponentModel.ISite
site
The site. |
Returns
GridViewDataColumn
|
BuildNameFromText(String, Type, IServiceProvider)
Builds the name from text.
Declaration
public static string BuildNameFromText(string text, Type componentType, IServiceProvider serviceProvider)
Parameters
System.String
text
The text. |
System.Type
componentType
Type of the component. |
System.IServiceProvider
serviceProvider
The service provider. |
Returns
System.String
|
ClampDateTime(DateTime, GridViewTimeFilteringMode)
Clamps the date time.
Declaration
public static DateTime ClampDateTime(DateTime value, GridViewTimeFilteringMode filteringMode)
Parameters
System.DateTime
value
The value. |
GridViewTimeFilteringMode
filteringMode
The filtering mode. |
Returns
System.DateTime
|
ClampDateTime(DateTime, GridViewTimeFilteringMode, GridViewTimePrecisionMode)
Clamps the date time.
Declaration
public static DateTime ClampDateTime(DateTime value, GridViewTimeFilteringMode filteringMode, GridViewTimePrecisionMode timePrecision)
Parameters
System.DateTime
value
The value. |
GridViewTimeFilteringMode
filteringMode
The filtering mode. |
GridViewTimePrecisionMode
timePrecision
The time filtering precision. Determines which time parts will be taken into acount when clamping the DateTime. |
Returns
System.DateTime
|
ContainsInnerDescriptor(PropertyDescriptorCollection, String)
Determines whether the inner descriptor is contained.
Declaration
public static bool ContainsInnerDescriptor(PropertyDescriptorCollection descriptors, string fieldName)
Parameters
System.ComponentModel.PropertyDescriptorCollection
descriptors
The descriptors. |
System.String
fieldName
Name of the field. |
Returns
System.Boolean
|
FindSubPropertyDescriptor(PropertyDescriptorCollection, String)
Finds the sub property descriptor.
Declaration
public static PropertyDescriptor FindSubPropertyDescriptor(PropertyDescriptorCollection descriptors, string fieldName)
Parameters
System.ComponentModel.PropertyDescriptorCollection
descriptors
The descriptors. |
System.String
fieldName
Name of the field. |
Returns
System.ComponentModel.PropertyDescriptor
|
GetBindingSourceNamePrefix(Object, String)
Gets the binding source name prefix.
Declaration
public static string GetBindingSourceNamePrefix(object dataSource, string dataMember)
Parameters
System.Object
dataSource
The data source. |
System.String
dataMember
The data member. |
Returns
System.String
|
GetCaption(PropertyDescriptor)
Gets the caption.
Declaration
public static string GetCaption(PropertyDescriptor descriptor)
Parameters
System.ComponentModel.PropertyDescriptor
descriptor
The descriptor. |
Returns
System.String
|
GetDefaultFilterOperator(Type)
Gets the default filter operator.
Declaration
public static FilterOperator GetDefaultFilterOperator(Type dataType)
Parameters
System.Type
dataType
Type of the data. |
Returns
FilterOperator
|
GetSortDirection(ListSortDirection)
Gets the sort direction.
Declaration
public static RadSortOrder GetSortDirection(ListSortDirection listSortDirection)
Parameters
System.ComponentModel.ListSortDirection
listSortDirection
The list sort direction. |
Returns
RadSortOrder
|
GetTypes(Type)
Gets the all sub types.
Declaration
public static ICollection GetTypes(Type baseType)
Parameters
System.Type
baseType
Type of the base. |
Returns
System.Collections.ICollection
|
GetUniqueName(ColumnGroupCollection, String)
Gets a unique name for an item of the unique.
Declaration
public static string GetUniqueName(ColumnGroupCollection collection, string baseName)
Parameters
ColumnGroupCollection
collection
The collection. |
System.String
baseName
A base name to use. |
Returns
System.String
A unique name for the collection. |
GetUniqueName(GridViewColumnCollection, String)
Gets a unique name for an item of the collection.
Declaration
public static string GetUniqueName(GridViewColumnCollection collection, string baseName)
Parameters
GridViewColumnCollection collection |
System.String
baseName
A base name to use. |
Returns
System.String
the unique name for the collection. |
GetValidTypes(Type, ITypeDiscoveryService)
Gets the valid sub types.
Declaration
public static Type[] GetValidTypes(Type baseType, ITypeDiscoveryService typeResolutionService)
Parameters
System.Type
baseType
Type of the base. |
System.ComponentModel.Design.ITypeDiscoveryService
typeResolutionService
The type resolution service. |
Returns
System.Type[]
|
IsBindableType(Type)
Checks whether the a column can be bounded to data of this type
Declaration
public static bool IsBindableType(Type type)
Parameters
System.Type
type
The type to check |
Returns
System.Boolean
True if the type is bindable, false otherwise. |
IsFloat(Type)
Determines whether the specified type is float.
Declaration
public static bool IsFloat(Type type)
Parameters
System.Type
type
The type. |
Returns
System.Boolean
|
IsFloatSql(Type)
Determines whether the specified type is float SQL.
Declaration
public static bool IsFloatSql(Type type)
Parameters
System.Type
type
The type. |
Returns
System.Boolean
|
IsInteger(Type)
Determines whether the specified type is integer.
Declaration
public static bool IsInteger(Type type)
Parameters
System.Type
type
The type. |
Returns
System.Boolean
|
IsIntegerSql(Type)
Determines whether the specified type is integer SQL.
Declaration
public static bool IsIntegerSql(Type type)
Parameters
System.Type
type
The type. |
Returns
System.Boolean
|
IsNumeric(Type)
Determines whether the specified type is numeric.
Declaration
public static bool IsNumeric(Type type)
Parameters
System.Type
type
The type. |
Returns
System.Boolean
|
IsSigned(Type)
Determines whether the specified type is signed.
Declaration
public static bool IsSigned(Type type)
Parameters
System.Type
type
The type. |
Returns
System.Boolean
|
IsSignedSql(Type)
Determines whether the specified type is signed SQL.
Declaration
public static bool IsSignedSql(Type type)
Parameters
System.Type
type
The type. |
Returns
System.Boolean
|
IsUniqueName(GridViewColumnCollection, String)
Checks whether the specified unique name exists in the specified collection.
Declaration
public static bool IsUniqueName(GridViewColumnCollection collection, string name)
Parameters
GridViewColumnCollection
collection
The GridViewColumnCollection to look. |
System.String
name
A valid unique name. |
Returns
System.Boolean
true if the name exists. |
IsUnsigned(Type)
Determines whether the specified type is unsigned.
Declaration
public static bool IsUnsigned(Type type)
Parameters
System.Type
type
The type. |
Returns
System.Boolean
|
IsUnsignedSql(Type)
Determines whether the specified type is unsigned SQL.
Declaration
public static bool IsUnsignedSql(Type type)
Parameters
System.Type
type
The type. |
Returns
System.Boolean
|
ShowErrorDialog(IUIService, Exception)
Shows the error dialog.
Declaration
public static void ShowErrorDialog(IUIService uiService, Exception ex)
Parameters
System.Windows.Forms.Design.IUIService
uiService
The UI service. |
System.Exception
ex
The ex. |