Sorry if this is obvious but I am just not getting it
I have a DataGridView that I have a button column in. I added this:
$datagridviewPartsNeeded.add_CellMouseClick and this works fine but works if I click any cell in the row. I would like to just have it trigger if I click the cell in that particular column.
Can I do that?
Scott
CellMouseClick on in certain column
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
- swindmiller
- Posts: 64
- Last visit: Tue Aug 22, 2023 11:59 am
Re: CellMouseClick on in certain column
I think I figured this out unless there is a better way:
$datagridviewPartsNeeded.add_CellMouseClick({
If ($datagridviewPartsNeeded.CurrentCell.ColumnIndex -eq 6)
$datagridviewPartsNeeded.add_CellMouseClick({
If ($datagridviewPartsNeeded.CurrentCell.ColumnIndex -eq 6)