Click here to Skip to main content
15,887,283 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need to fire CellValueChange Event in DataGridView when directly update in datatable is a
DataSource of Grid whether it's working directly if we have set value in cell manually. I have tried with CellFormating event also but it's working only for visible cells.

Any help will be greatly appreciated
Posted

1 solution

Probably you don't understand something very basic and fundamental. You cannot directly "raise event", unless the event instance is declared in the same class where you want to invoke it; you cannot invoke an event even in a derived class. As the class DataGridView is the code from .NET FCL, you cannot invoke that event at all. This is a very important fool-proof feature of .NET. You never really need to invoke those events; they are no designed for that. You can only handle the event. The even will be invoked in this class when you actually change the content of any cell, but that cannot be a problem, right? :-)
—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900