PC Review


Reply
Thread Tools Rate Thread

Datagrid , dataset, threading - problem with 1st row

 
 
=?Utf-8?B?SmFuIFNjaHVzdHI=?=
Guest
Posts: n/a
 
      14th Mar 2005
I have dataGrid and as datasource is dataSet.Table[0] .
In my app i set datasource to dataset.tables[0] , in this moment is dataset
empty. Then user click on the button, run another (long-during) thread, and
this thread adding rows to the dataset like this:

DataRow v_row = dataSet.Table[0].NewRow;
v_row[0] = "xx";
v_row[1] = "yy";
this.Invoke(myProc,new object[] {v_row});

and myProc i delegate and shows on this:

void MYPROC (DataRow v_row)
{
dataSet.Tables[0].Rows.Add(v_row);
}

Everythink works fine, but for the first time then I fill table occurs this
behaviour:
first row is save to dataset well. Second row is save well but in this
moment is first row changed to the same value as second row. Others rows is
OK. Then I refill the table everythink is OK, this is happen only for the
first time after initiallization.

I tried everythink for the last 3 days. Can anybody please help me?

I thougt that problem is with multithreading, but i don't known where a why?

Thanks for anythink.

Jan Schustr









 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RE: More on my Dataset / Datagrid problem =?Utf-8?B?QUpL?= Microsoft Dot NET Compact Framework 7 7th Sep 2004 07:15 AM
RE: More on my Dataset / Datagrid problem =?Utf-8?B?bWFyY21j?= Microsoft Dot NET Compact Framework 0 2nd Jul 2004 01:50 PM
Problem with DataGrid and DataSet Trey Microsoft ADO .NET 0 27th Feb 2004 08:35 PM
C# Datagrid Dataset problem. pcPirate Microsoft C# .NET 0 9th Nov 2003 07:21 AM
datagrid scrolling/ threading problem hs Microsoft Dot NET Framework Forms 17 12th Sep 2003 11:00 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:00 AM.