Skip to content

DGV Cell tools event handler - can't change cell.Value #215

Description

@itg-assistant

Tiago Freitas Leal asked 2016-08-26 14:40:37 UTC

On my DGV, I have a Tool in a TextBox column. The tool has a proper name (tool.Name = "clear").

The event handler fetches the cell

var cell = ((DataGridView)sender).Rows[e.RowIndex].Cells[e.ColumnIndex];

and set its value to empty

cell.Value = string.Empty;

The debugger shows that each step does what it's supposed to do but the fact is the DGV cell shows the same content (if I set it to "Abc", after running the tool it shows "Abc" all the same)

Sample attached

Metadata

Metadata

Assignees

No one assigned

    Labels

    GeneralQuestions, how-tos and everything else.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions