المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : What invoked the getformattedvalue function in datagridviewtextboxcell?



C# Programming
02-13-2010, 05:31 PM
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=]