Selection behavior of the Infragistics grid controls gives the end users ability to select columns, rows and cells (both single and multiple) and thus help them visualize the grid parts that will eventually be edited or modified.
In order to be used, Selection behavior of the grid must be enabled first.
To enable Selection behavior on “WebGrid” (UltraWebGrid):
Change “SelectTypeCellDefault” (cell selection), “SelectTypeRowDefault” (row selection), “SelectTypeColDefault” (column selection) property/properties from “None” to “Single/Extended” in grid properties (“DisplayLayout”) or add them manually to the .aspx source code:
<DisplayLayout Name="UltraWebGrid1" SelectTypeCellDefault="Single" >
</DisplayLayout>
<DisplayLayout Name="UltraWebGrid1" SelectTypeRowDefault="Extended">
</DisplayLayout>
<DisplayLayout Name="UltraWebGrid1" SelectTypeColDefault="Extended">
</DisplayLayout>
To enable Selection behavior on “WebDataGrid/WebHierarchicalDataGrid”:
-
In the Microsoft® Visual Studio™ property window, locate the Behaviors property and click the ellipsis (…) button to launch the Behaviors Editor Dialog.
-
Check the CheckBox next to Selection on the left-hand side to add and enable the behavior.
Note
|
Note:
At this point you can configure additional Selection related properties (e.g., what type of selection to allow).
|
-
The CellClickAction property is set to Cell by default. In this example, we will leave the default value.
Note
|
Note:
When enabling RowDeleting you are also prompted to add Selection. If you choose to do so, Selection and RowSelectors will be enabled, with theRowSelectType and CellClickAction Selection properties set to Single and Row, respectively.
|
-
Click Ok to close the dialog. “WebDataGrid/WebHierarchicalDataGrid” is now set up to select a cell when it is clicked.
The “Selection” behavior can also be added in the .aspx source code for the “WebDataGrid/WebHierarchicalDataGrid” controls:
<Behaviors>
<ig:Selection CellSelectType="Single" Enabled="true">
</ig:Selection>
</Behaviors>