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.
In the given example,
2.1- Configuring with SQL Tables
After creating the columns,
Map the columns of the grid to corresponding table fields.
SQL Commands Execution
Database Commands and called by rules.
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
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,
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:
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)
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
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.