Rules Related to Search Grid
This rule is used to fill the search grid. After the Search configuration one must call FillData function to fill the search control.
2. GridGetvalue :
To get value from a particular column of the search control.
To set value to a column.
5.2 And 5.3 Rule Illustration: Calculate net amount of products in a search grid
Net Amount (marked in red box) is a composite column. We want to calculate Net amount of each and every product in the search grid.
Step1: GridGetValue function should be initialized only if there is at least one row in the search grid. So first we have to check RowIndex of the search control is null or not. This is shown in the first decision box.
Note: Take the column index from the search configuration not from the preview page.
I used the search control itself as trigger for this rule so that Netamount will be calculated once the search is completed.
This function helps to set style to rows in a search grid. Currently we can set two style properties, “BGColor and FontColor”.
Check figure 5-6 which shows a search grid without any row style.
I am going to highlight all the rows in which the “gender= male” into red color and font color of all other rows Into blue color.
If Gender!= male, set font color of those rows into “Blue” color. This is shown in the first action box of the “else” condition decision box.
This function helps to set style to a particular column.
Check the last action box in Figure 4-7.
Here the second column of the search grid will be in yellow color if the “Gender!= male”.
Search1- Control Name.
Search.1RowIndex- Row Index.
2 – Column Index
Yellow – Value (which color needs to be set).
This function used to set the column headers of a search grid.
Function Syntax Explanation:
Column Index: Column number
1-Header Text: The text which need to be displayed as the column header.
2- Column Index
“Header Changed” -Text which will appear as column header.
GridControlName: Search/Dynamic grid
Column Index: column number
If the value is “True” then the column will be displayed. If the value is “false” that column will not be displayed.
Refer Figure 5‑12. I want a search grid with all the columns in Figure 5‑13 except “CUstID” column. So I am using “GridSetColVisible” function.
8. Rules Related to Details View Toolbar
1.1 GridRowDetailsGetValue (GridControl Name,RowIndex,ControlNamewithProperty)
To get the value from a details view control.
1.2 GridRowDetailsSetValue(GridControlName,RowIndex, ControlNamewithProperty,Value)
To set value to a detailview control.
6.1 Syntax Explanation:
In this rule, getting the value of the row detail control (TxtFname) and assigns that value to TextBox10.