Click here to Skip to main content
16,018,264 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
I derived a new class from DataGridViewTextBoxCell in my application and overrided the function GetFormattedValue

In GetFormattedValue, I do some data binding (for example I read a ID from the database on the web and I show the corresponding name of that item from my local information which are pre-read in a datatable).

However, some databinding need to query from the web. It slowed down the application so every time when I need to do the bindings related to the web, I open a new thread to do the query, and show the original value(e.g. the item's ID) at the moment first.

The problem now is I don't know how to invoke the GetFormattedValue function when the query is finished so that it would show the desired value (e.g. the item's name).

Anyone could help? Thanks a lot=]
Posted

sir i want to clear example for this control
 
Share this answer
 
GetFormattedValue is a protected function and in those threads you could not put in the parameters needed to call GetFormattedValue. So I can't call it directly.

Btw, I get the answer now, the Refresh() functon of the datagridview could solve the problem.

Hope this could help some people =]
 
Share this answer
 
Why don't you invoke the getformattedValue function for a particular cell in the end of the thread. If this does not help please does not help please elaborate your problem so that i could get the exact idea of your problem.
 
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