Home Forums WinForms controls Xceed Grid for WinForms Avoiding Accessing Cells through Column Names

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #13439 |

    I would like to avoid accessing cells by using column names. For example:

    row.Cells[“ColumnXyz”]

    Ideally, I want to access it as follows:

    row.Cells[columnXyz] (i.e. using the column reference).

    Advantages of the later technique include:
    – If column name is changed, the code will break at compilation time rather than at runtime.
    – It may be faster.

    To implement this, I think CellList will need to have a third overload which uses the column reference as an indexer. So it will be possible to access a cell using column index, column name, or column reference.

    Does this make sense? Will it be considered in future versions?

    Regards,
    Victor.

    Imported from legacy forums. Posted by vboctor (had 1848 views)

    User (Old forums)
    Member
    Post count: 23064

    That might be nice. If you want to, you can do something like this, right now: row.Cells[columnXyz.Index];

    Imported from legacy forums. Posted by Tommy (had 2842 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.