Home Forums WinForms controls Xceed Grid for WinForms Need to detect when cell selected and return value

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

    Hi

    I need to return the value of the contents of a cell in my grid when it is clicked upon. Any help in this matter would be appreciated.

    Thanks

    Nick

    Imported from legacy forums. Posted by Nick (had 2782 views)

    User (Old forums)
    Member
    Post count: 23064

    No need to reply I figured it out.

    Thanks

    Nick

    Imported from legacy forums. Posted by Nick (had 210 views)

    User (Old forums)
    Member
    Post count: 23064

    Hi,
    I need help on this too.
    Thanks

    Imported from legacy forums. Posted by Paul (had 235 views)

    User (Old forums)
    Member
    Post count: 23064

    Try this:<code>// in the constructor, after the call to InitializeComponent
    foreach(Cell cell in grid.DataRowTemplate.Cells) cell.Click += new EventArgs(cellClick);
    // in a separate method
    private void cellClick(object sender, EventArgs e) {
    Cell cell = sender as Cell;
    if (cell != null) {
    object cellValue = cell.Value;
    }
    }</code>

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

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