Click here to Skip to main content
15,914,225 members
Home / Discussions / C#
   

C#

 
AnswerRe: Wheres my data when app.config is an Embedded Resource Pin
Hayder Marzouk26-Mar-07 2:20
Hayder Marzouk26-Mar-07 2:20 
GeneralRe: Wheres my data when app.config is an Embedded Resource Pin
Christopher Stratmann26-Mar-07 2:25
Christopher Stratmann26-Mar-07 2:25 
QuestionScope of Refereances to Instances Pin
MehmetFurkan26-Mar-07 1:42
MehmetFurkan26-Mar-07 1:42 
AnswerRe: Scope of Refereances to Instances Pin
rah_sin26-Mar-07 1:55
professionalrah_sin26-Mar-07 1:55 
QuestionRe: Scope of Refereances to Instances Pin
MehmetFurkan26-Mar-07 4:37
MehmetFurkan26-Mar-07 4:37 
Questionget data in background for datagridview Pin
Seishin#26-Mar-07 0:53
Seishin#26-Mar-07 0:53 
AnswerRe: get data in background for datagridview Pin
Hayder Marzouk26-Mar-07 2:23
Hayder Marzouk26-Mar-07 2:23 
AnswerRe: get data in background for datagridview Pin
Seishin#26-Mar-07 3:03
Seishin#26-Mar-07 3:03 
ok. i got it..

<br />
public bool GetPricesForRow(DataGridViewRow row) {<br />
ManualResetEvent doneEvent = new ManualResetEvent(false);<br />
PricesForRow pfr = new PricesForRow(row.Cells[1].Value.ToString().Trim(), doneEvent);<br />
<br />
bool x = ThreadPool.QueueUserWorkItem(pfr.ThreadPoolCallback);<br />
WaitHandle.WaitAll(new WaitHandle[] { doneEvent });<br />
int colCt = row.DataGridView.Columns.Count;<br />
row.Cells[colCt - 2].Value = pfr.OutBold;<br />
row.Cells[colCt - 1].Value = pfr.OutNormal;<br />
row.Refresh();<br />
<br />
return x;<br />
}<br />


and an additional class:

<br />
class PricesForRow {<br />
ManualResetEvent _doneEvent;<br />
string _param;<br />
<br />
string _outBold;<br />
public string OutBold {<br />
get { return _outBold; }<br />
set { _outBold = value; }<br />
}<br />
<br />
string _outNormal;<br />
public string OutNormal {<br />
get { return _outNormal; }<br />
set { _outNormal = value; }<br />
}<br />
<br />
public PricesForRow(string param, ManualResetEvent doneEvent) {<br />
_param = param;<br />
_doneEvent = doneEvent;				<br />
}<br />
<br />
public void ThreadPoolCallback(Object threadContext) {<br />
try {					<br />
string[] vals = DataBase.Instance.GetKtmsPrices(_param);<br />
_outBold = vals[0];<br />
_outNormal = vals[1];<br />
_doneEvent.Set();<br />
} catch { }<br />
}<br />
}<br />


this works just fine!! doesn't slowdown the grid or anything..

life is study!!!

Questionwonder if some one clear the confusion about Generating MS project Pin
fulbright26-Mar-07 0:41
fulbright26-Mar-07 0:41 
QuestionINTEROP PROBLEM (using dll written in c, linked list) Pin
mephy8326-Mar-07 0:32
mephy8326-Mar-07 0:32 
AnswerRe: INTEROP PROBLEM (using dll written in c, linked list) Pin
netJP12L26-Mar-07 4:14
netJP12L26-Mar-07 4:14 
AnswerRe: INTEROP PROBLEM (using dll written in c, linked list) Pin
Leslie Sanford26-Mar-07 5:24
Leslie Sanford26-Mar-07 5:24 
Questionunderlying type for enum Pin
blackjack215025-Mar-07 23:40
blackjack215025-Mar-07 23:40 
AnswerRe: underlying type for enum Pin
originSH25-Mar-07 23:48
originSH25-Mar-07 23:48 
GeneralRe: underlying type for enum Pin
blackjack215026-Mar-07 0:01
blackjack215026-Mar-07 0:01 
GeneralRe: underlying type for enum Pin
originSH26-Mar-07 2:12
originSH26-Mar-07 2:12 
AnswerRe: underlying type for enum Pin
Guffa26-Mar-07 2:18
Guffa26-Mar-07 2:18 
QuestionProblems with Console Output from Windows-App Pin
J. Holzer25-Mar-07 23:36
J. Holzer25-Mar-07 23:36 
AnswerRe: Problems with Console Output from Windows-App Pin
m@u26-Mar-07 3:39
m@u26-Mar-07 3:39 
Question.NET out of proc component exposing COM Interface Pin
abhinarulkar25-Mar-07 23:28
abhinarulkar25-Mar-07 23:28 
QuestionHow to check if one type it is .Net type Pin
darkcalin25-Mar-07 22:59
darkcalin25-Mar-07 22:59 
AnswerRe: How to check if one type it is .Net type Pin
Colin Angus Mackay25-Mar-07 23:10
Colin Angus Mackay25-Mar-07 23:10 
GeneralRe: How to check if one type it is .Net type Pin
darkcalin25-Mar-07 23:16
darkcalin25-Mar-07 23:16 
GeneralRe: How to check if one type it is .Net type Pin
Colin Angus Mackay25-Mar-07 23:18
Colin Angus Mackay25-Mar-07 23:18 
GeneralRe: How to check if one type it is .Net type Pin
darkcalin25-Mar-07 23:32
darkcalin25-Mar-07 23:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.