문제

I'm working with Windows forms. I want an event to fire when the user makes a selection of cells (or one cell) in the datagridview. The SelectionChanged Event is firing as soon as I select one cell. Is there any way to have it wait for the user to be done selecting?

I have tried the CellMouseUp event, but I don't like its behaviour because if MouseUp happens outside the grid it doesn't fire.

도움이 되었습니까?

해결책

As they select each cell a new selection change should be fired. so you are looking at "remembering" the selected cells each time the eventhandler gets triggered and then doing your processing based on that. How much of a pain this going to be depends on what processing you are doing with the selection. Could be a good deal.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top