DataGrid
Controls Suite 4.5 |
| Overview |
| Features |
| Reference Book |
| Live Demos |
| | Populating with Data |
| | Columns |
| | Rows |
| | Appearance & Layout |
| | Behavior |
| | Bottom Bar |
| | Application scenarios |
| | | Master/Detail Grids |
| | | CheckBoxes |
| | | DropDowns |
| | | Images |
| | | Update Panel |
|
- dg.AddRowFilter(GridID, Filter);
Adds a filter expression to the current Grid's filter expression.
- dg.CallTheServer(GridID, RowID, ColumnName, CellValue, Parameter);
Initiates a user-defined asynchronous (AJAX) call to the server. Parameter is a string value that is passed from the client-side procedure to the server-side procedure. For example, you can write conditional branches within a method depending on a Parameter's value.
- dg.ClearCache(GridID);
Deletes the cached pages of Grid.
- dg.ClearPageCache(GridID);
Deletes the cached data for the current Grid page.
- dg.CloseEditForm();
Closes the Edit Form.
- dg.DecodeCellValue(CellValue);
Decodes the cell value received from the column template (from the $CellValueEncoded$ variable).
- dg.DecodeValue(Value);
Decodes the value received from the server-side event-handling method. Can be used for decoding the Parameter value received by the client-side function applied by the ClientSideAfterCallBack property.
- dg.DeleteRow(RowID);
Deletes the Row by its ID.
- dg.FindSelectedRow(GridID);
Finds the page where the selected row is located. Returns 'true' if the row was found, otherwise the function returns 'false'.
- dg.GetCellValue(GridID, RowID, ColumnName);
Returns the cell value.
- dg.GetColumnName(GridID, ColumnIndex);
Returns the name of the specified column.
- dg.GetEditFormElement(GridID, ElementID);
Returns the Element on the Edit Form. By using this method, any element on the Edit Form can be validated on the client side before request to the server.
- dg.GetFullGridID(GridID);
Gets the unique identifier of the DataGrid.
- dg.GetRowFilter(GridID);
Gets the expression used to filter which rows are viewed in the DataGrid.
- dg.GetWindowWidth();
Gets the width of window in pixels.
- dg.GetWindowHeight();
Gets the height of window in pixels.
- dg.InitGrid(GridID);
Initializes the DataGrid control.
- dg.InitColumnWidths(GridID, PostBack);
Initializes columns of the DataGrid control. Sets all columns at an equal percent fraction of the DataGrid width. The initialization is not performed if the page is loaded after PostBack and the PostBack=false.
- dg.InsertRow(CloseEditForm);
Adds a record to the Grid. The Edit Form is not closed automatically if the CloseEditForm=false.
- dg.Refresh(GridID);
Refreshes the content of the DataGrid.
- dg.RemoveRowFilter(GridID);
Removes a filter from the DataGrid.
- dg.SetCellValue(GridID, RowID, ColumnName, CellValue);
Sets the value of the specified cell on the current page.
- dg.SetGridHeight(GridID, Height);
Sets the height of the DataGrid in pixels. Range: 60-2048.
- dg.SetGridWidth(GridID, Width);
Sets the width of the DataGrid in pixels. Range: 100-4096. Example:
<div onclick="dg.SetGridWidth('dg1', 500);">Set width</div>
- dg.SetPage(GridID, PageNumber);
Sets the grid page number to be shown.
- dg.SetRowFilter(GridID, Filter);
Sets the expression used to filter which rows are viewed in the DataGrid. Filter - a string that specifies how rows are to be filtered.
<div onclick="dg.SetRowFilter('dg1', 'CustomerID Like \'A%\'');">SetRowFilter</div>
<div onclick="dg.SetRowFilter('dg1', 'CustomerID = \'ANTON\'');">SetRowFilter</div>
- dg.ScrollToTop(GridID);
Scrolls the contents of the grid to the top position.
- dg.ScrollToLeft(GridID);
Scrolls the contents of the grid to the left position.
- dg.Sort(GridID, ColumnIndex, Direction);
Sorts the data in the DataGrid. Direction values: '1' - ascending order, '2' - descending order. Example:
<div onclick="dg.Sort('dg1', 1, '2');">Sort</div>
- dg.UpdateRow(CloseEditForm);
Updates the current record. The Edit Form is not closed automatically if the CloseEditForm=false.
|