APNSoft Controls [4.5.2.20] - API Reference
APNSoftDataGrid Members

APNSoftDataGrid overview

Public Static (Shared) Properties

EditFormMethod Gets a value indicating the Edit Form is opened for INSERT or UPDATE. Default value is Undefined. When you open the Edit Form for UPDATE, fill in form fields with selected row data. Use the EditFormRow property to get the selected row.
EditFormRow Gets the selected row, used to fill in the Edit Form before update.

Public Instance Constructors

APNSoftDataGrid Constructor Initializes a new instance of the APNSoftDataGrid class.

Public Instance Properties

AutoPostBackOnRowClick Specifies whether the control causes a postback to the server when a row is clicked. Default value is false.
AutoPostBackOnRowDblClick Specifies whether the control causes a postback to the server when a row is double-clicked. Default value is false.
AutoResize Gets or sets a value specifying the way for DataGrid to be resized (if necessary) when data is loaded. Default value is None. When the property's value is WidthAndHeight, DataGrid displays data without scrollbars.
BasePage (inherited from APNSoftControl) Gets or sets the reference to the Base Page. Used only in Code Behind.
BottomBar Gets the Bottom Bar.
CellEditingEnabled Gets or sets a value specifying whether the cell editing is enabled. Triggered by clicking twice on a cell. Default value is false.
ClientSideAfterCallBack Gets or sets the client-side code to be launched after CallBack request. Property value can include variables $ComponentID$, $Command$ and $Parameter$, instead of which data is inserted.
ClientSideAfterInit Gets or sets the client-side code to be launched after DataGrid initialization. Property value can include variable $ComponentID$, instead of which data is inserted.
ClientSideBeforeCellUpdate Gets or sets the client-side code (procedure) to be launched before Cell Update. This code can be used for data validation and auto correction. Property value can include variables $ComponentID$, $RowID$, $ColumnName$ and $CellValue$, instead of which data is inserted.
ClientSideOnContextMenuHeader Gets or sets the client-side code to be launched before the context menu for header is displayed. Property value can include variables $ComponentID$, $ColumnIndex$ and $ContextMenu$, instead of which data is inserted. The $ContextMenu$ is a DIV element with context menu data.
ClientSideOnContextMenuRow Gets or sets the client-side code to be launched before the context menu for rows is displayed. Property value can include variables $ComponentID$, $RowID$, $CellValue$ and $ContextMenu$, instead of which data is inserted. The $ContextMenu$ is a DIV element with context menu data.
ClientSideOnPage Gets or sets the client-side code to be launched when a new page is opened. Property value can include variables $ComponentID$ and $PageNumber$, instead of which data is inserted.
ClientSideOnRowClick Gets or sets the client-side code to be launched when a row is clicked. Property value can include variables $ComponentID$, $RowID$, $ColumnName$ and $CellValue$, instead of which data is inserted.
ClientSideOnRowDblClick Gets or sets the client-side code to be launched when a row is double-clicked. Property value can include variables $ComponentID$, $RowID$, $ColumnName$ and $CellValue$, instead of which data is inserted.
Columns Gets the collection of columns.
ConfirmTextDelete Gets or sets the text to be shown on the confirmation dialog before the record is deleted. The prompt is automatically enabled if this property is set.
ConfirmTextInsert Gets or sets the text to be shown on the confirmation dialog before the record is inserted. The prompt is automatically enabled if this property is set.
ConfirmTextUpdate Gets or sets the text to be shown on the confirmation dialog before the record is updated. The prompt is automatically enabled if this property is set.
ContextMenuHeader Gets the Context Menu for Header.
ContextMenuRow Gets the Context Menu for Row.
CSSClassesPrefix (inherited from APNSoftControl) Gets or sets the prefix for CSS Style classes. Used for association between the set of classes and component instance.
CSSSource (inherited from APNSoftControl) Gets or sets the location of the CSS Style. Default value is SkinFolder.
CSSStyleName (inherited from APNSoftControl) Gets or sets the name of the CSS Style. The CSS Style must be located in the Skin Folder as specified by the SkinFolder property.
CSSText (inherited from APNSoftControl) Sets the CSS style value for the control.
DataSource (inherited from APNSoftControl) Gets or sets the data source that provides data for populating the control.
DataSourceID Gets or sets the ID of the control from which the DataGrid retrieves its list of data items.
EditForm Gets the Edit Form.
FixedColumnsOpacity Gets or sets the opacity factor applied to the fixed columns. Range: 0-100. Default value is 100 (columns are NOT transparent).
Height Gets or sets a value indicating the height of the DataGrid in pixels. Range: 60-2048.
HighlightHoveredRow Gets or sets a value specifying whether the hovered row is highlighted. Default value is true.
HighlightSelectedRow Gets or sets a value specifying whether the selected row is highlighted. Default value is true.
KeyFieldName Gets or sets the name of column that uniquely identifies each record stored in the table. The key field is commonly used in a handler for an event, such as UpdateCommand or DeleteCommand, as part of an update query string to revise a specific record in the data source. The key field helps the update query string identify the appropriate record to modify.
MessageDeleting Specifies a message to be displayed when control deletes a record. Default value is Deleting....
MessageInserting Specifies a message to be displayed when control inserts a record. Default value is Inserting....
MessageLoading Specifies a message to be displayed when control loads records. Default value is Loading....
MessageNoRecords Specifies a message to be displayed when there are no records in the data source. Default value is No records to display..
MessageProcessing Specifies a message to be displayed when control launches custom asynchronous call. Default value is Processing....
MessageReady Specifies a message to be displayed when control is ready for an action. Default value is Ready..
MessageUpdating Specifies a message to be displayed when control updates a record. Default value is Updating....
Mode Gets or sets the running mode of the DataGrid.
OutputFooter (inherited from APNSoftControl) Gets or sets the data used as a footer for the output HTML markup. Use the "Default" keyword for the standard comment.
OutputHeader (inherited from APNSoftControl) Gets or sets the data used as a header for the output HTML markup. Use the "Default" keyword for the standard comment.
PageCount Gets the total number of pages in the grid.
PageSize Gets or sets the maximum number of rows to be displayed on a single page of the DataGrid control. Range: 1-10000. The default value is 20. The total number of pages is calculated automatically depending on data amount.
Position (inherited from APNSoftControl) Gets or sets the type of positioning used for the control. Default value is Static.
PositionLeft (inherited from APNSoftControl) Gets or sets the left coordinate for the control, which positioned at an absolute position. Default value is 0.
PositionTop (inherited from APNSoftControl) Gets or sets the top coordinate for the control, which positioned at an absolute position. Default value is 0.
RegisterClientScript (inherited from APNSoftControl) Gets or sets a value indicating whether the component registers the client script with the Page. Default value is true.
RightClickSelect Gets or sets a value specifying whether a row is selected when the user right-clicks on the row. Default value is true. Note that the property value must be true if you use context menu for rows.
RowFilter Gets or sets the expression used to filter which rows are viewed in the DataGrid.
Rows Gets the collection of rows.
SEOEnabled Gets or sets a value indicating whether the DataGrid renders an additional NOSCRIPT section with links which correspond to DataGrid rows. Default value is false.
SkinFolder (inherited from APNSoftControl) Gets or sets the URL for a Skin Folder. Skin Folder includes all component skin parts (CSS Style, images, etc.). The property value can be an absolute or relative URI.
WarningsEnabled (inherited from APNSoftControl) Gets or sets a value indicating whether the component generates a client-side JavaScript messages which allow developers to control the component status. Default value is true.
Width Gets or sets a value indicating the width of the DataGrid in pixels. Range: 100-4096.
zIndex (inherited from APNSoftControl) Gets or sets the z-index style value for the control. Default value is 200.

Public Instance Methods

AddContextMenu Adds Context Menu into the collection.
ApplyRowFilter Sets a filter to the rows.
DataBind Creates a binding between the DataGrid control and a data source.
GetSelectedRow Returns the Selected Row.
GetSortedColumn Returns the Sorted Column.
ResetColumnWidths This method sets all columns at an equal percent fraction of the DataGrid width.
ResetPageNumber This method sets a Page Number to its default value.
ResetScrollbars This method sets Scrollbars to default values.
ResetSelectedRow This method removes the 'Selected' attribute from the row.
ResetSortedColumn This method removes the 'Sorted' attribute from the column.
SetPage Sets the current page number. This method must be called after the DataBind() method.
SortRows Sorts the rows in the collection.

Public Instance Events

CallTheServer Occurs on the server side when we call the server from client side by launching the dg.CallTheServer(); procedure.
CellValueChanged Occurs on the server side when the cell value is changed.
DeleteCommand Occurs on the server side when an delete command is fired.
ExportCustom Occurs on the server side when the Custom Export command is fired.
ExportToExcel Occurs on the server side when the Export To Excel command is fired.
ExportToHTML Occurs on the server side when the Export To HTML command is fired.
InsertCommand Occurs on the server side when an insert command is fired.
OnRowClick Occurs on the server side when the row is clicked or double-clicked.
PageNumberChanged Occurs on the server side after the page is changed.
SortCommand Occurs on the server side when a sort command is fired.
UpdateCommand Occurs on the server side when an update command is fired.

See Also

APNSoftDataGrid Class | APNSoft.WebControls Namespace