Tables can be used for many different applications. Whether tables are used to align text on a page, to structure data or to do some calculations - TX Text Control gives you a powerful set of table functionality to fulfill these requirements.
This sample consists of a TextControl in which a table that is used as a spreadsheet:
The first row and the first column of the spreadsheet table is used to display the cell names and therefore they are protected and can't be modified by the user. If the input position is inside one of these title cells, the TextControl.EditMode property is used to prevent the user from changing these cells:
[C#] TXTextControl.TableCell cell = _activeTable.Cells.GetItem(); if ((cell.Column == 1) || (cell.Row == 1)) textControl.EditMode = EditMode.ReadAndSelect; else textControl.EditMode = EditMode.Edit;
[Visual Basic] Dim cell As TXTextControl.TableCell = _activeTable.Cells.GetItem() If (cell.Column = 1) OrElse (cell.Row = 1) Then TextControl1.EditMode = EditMode.ReadAndSelect Else TextControl1.EditMode = EditMode.Edit End If