One of the actions that you will perform the most over a grid is selecting cells. This topic describes several approaches that can be used to select a particular cell in the UltraGrid control:. Simulating Clicks on Cells. Using the UltraGrid. ActiveCell Property. When testing Infragistics UltraGrid controls, use specific methods and properties of the corresponding Infragistics UltraGrid object.
You can call these methods and properties from your keyword tests, as well as from scripts. However, when testing a UltraGrid control from your keyword test, you can use the same methods and properties calling them from keyword test operations.
For more information, see Keyword Tests Basic Operations. The actions of the InfragisticsUltraGrid object apply to the cells of the main data view, whereas the InfragisticsUltraGridView actions affect the cells of the assosiated child data view. WinFormsObject "frmFixedHeaders". WinFormsObject 'frmFixedHeaders'. Click RowIdx, ColumnName ; end ;. It is possible to select a particular cell using the native methods and properties of a UltraGridCell object.
To get an object that corresponds to the desired cell you can use the GetCell routine. This routine returns an object that corresponds to the grid cell specified by the row index and the column index or name.
The code in the UltraGrid InitializeLayout event tells the grid to fit the columns to the width of the grid:. The btnActivateCellwithCode event code retrieves a reference to the third row down, sets the ActiveRow , sets the ActiveCell and enters edit mode:. The ActiveCell property can only be set if it resides in the active row as determined by the ActiveRow property therefore ActiveRow must be set before the ActiveCell. We're sorry but this site requires JavaScript. Is this content useful?
Thank you for your feedback! You have rated this topic in the last 30 days. Send Feedback. Questions Can I tab to the next cell and make it the active cell? Can I set the active cell through program code? Solutions Click on the cell with the left mouse button. Sample Project This sample project displays a grid containing some rows and columns.
Imports Infragistics. Activation and Column. GetType "System. String" dt. Add "One" , "1" dt. Add "Two" , "2" dt. Add "Three" , "3" dt.
Add "Four" , "4" dt. Bands 0. Columns 0. AddNew 'Override the Activaction oRow. AllowEdit oRow. LightSalmon oRow. Cells 1.
0コメント