Introduction
Dynamic Grid is an advanced grid which allows the user to Display/Create/Update data from database.
Another creative future of the dynamic grid is that the user can configure a control for a cell and it can be created dynamically based on certain user defined rules.
This Dynamic grid can be bind to SQL Tables and the SQL stored procedures as well.
Dynamic Grid Configuration
Dynamic Grid’s wizard can be configured from Columns property of Dynamic grid.
The Controls property of column can be configured in the property window by clicking the button at right side.
For e.g. If the control selected is Combo Box then we can set the properties for Combo Box there itself.
If selected column is Composite Column, then the display rules can be created by clicking the Property button at the right side. So a popup will appear as like follows:
In the given example,
2.1- Configuring with SQL Tables
After creating the columns,
Map the columns of the grid to corresponding table fields.
Select
On the Next Click Map the Primary Column and Click Finish to complete the Configuration wizard.
SQL Commands Execution
Database Commands and called by rules.
Eg: ExecuteCommand(DynamicGridDataSource27.Select)
ExecuteCommand(DynamicGridDataSource27.Insert)
ExecuteCommand(DynamicGridDataSource27.Update)
For adding new row press TAB at the last cell, then a new blank row will be generated at the bottom and internally that row’s mode will new.
When Insert command is called, all rows newly inserted will be saved to database and internally that entire new rows mode will be changed to update.
When Update command is called, then all existing data will updated based on the condition given.
Composite Column Rendering in CRM
When India Selected as country
2-2 Stored Procedure Configuration
In this only one stored procedure can be bind to grid so the user have to manage the logic of select ,Insert, Update from the store procedure .
After creating the Columns,
The left side is the input parameters for the stored procedure and right side denotes the return values from the stored procedure.
Then click finish to complete the configuration wizard.
Stored Procedure can be executed using rule ExecuteCommand(DynamicGridDataSource.SP)
3.1 Allow Paging:
By default this field is “unchecked” and as a result dynamic grid will be appeared without paging. Page numbers will be added if this field is in true condition. A sample Dynamic Grid with paging is shown below:
3.2 Page Size:
This is the number of results per page. 10 is the default value and it can be modified.
3.3 Show Header:
This field value determines whether the columns headers in a grid need to be displayed or not. If this property is in unchecked condition, column headers won’t be showed in the grid as shown below. Please compare Figure 21 and Figure 22.
In figure 2-2 grid appears without column headers.
3.4 Export to Excel:
By make this property as true, we can export the data in the dynamic grid into an excel sheet. If this field is true an excel icon will be available at the bottom of the grid.
3.5 Fill Data Trigger:
Fill Data Trigger helps to call the dynamic grid in three different ways. Following are the options:
On each row: If this is the Fill Data Trigger; then the corresponding rule will be executed, on fill each row of the dynamic grid. This trigger is useful to get the corresponding row index of the grid.
On each cell: If this is the Fill Data Trigger; then the corresponding rule will be executed, on fill each cell of the dynamic grid. This trigger is useful to get the corresponding column index of the grid.
On complete: The rule will be triggered, once the grid is completely filled in.
Rules for Dynamic Grid
GridGetValue(Grid Name, Row Index, Col Index)
GridSetValue(Grid Name, Row Index, Col Index, Value)
GridName.RowIndex
Grid can be added as trigger for a rule, so that it will execute for every row change. You will get the corresponding row index from property GridName.RowIndex
Sample Grid Rule
Second and Third Columns are saved to variable VarName and VarCountry . It is appended to another variable VarRuleCol. This value is set to Column with index 6.
OutPut
Column Grouping Property of Radiobutton in Dynamic Grid Control
This property helps to select the Radiobutton value either column or row wise without using rules.
5.1 Radiobutton grouping in a row
-Open the Property window of the control RadioButton2.
CRM View
Radio button grouping in a grid
CRM View
2019-06-04 11:23:19