Click here to Skip to main content
15,921,454 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to add Custom folder To setup project Pin
sathish s13-Aug-07 3:37
sathish s13-Aug-07 3:37 
GeneralRe: How to add Custom folder To setup project Pin
salmonraju13-Aug-07 3:53
salmonraju13-Aug-07 3:53 
Questionhow to connect to sql Pin
costavo13-Aug-07 1:50
costavo13-Aug-07 1:50 
AnswerRe: how to connect to sql Pin
Giorgi Dalakishvili13-Aug-07 2:03
mentorGiorgi Dalakishvili13-Aug-07 2:03 
AnswerRe: how to connect to sql Pin
Russell Jones13-Aug-07 5:53
Russell Jones13-Aug-07 5:53 
Questionsome problem with ResourceManager Pin
Areff13-Aug-07 1:27
Areff13-Aug-07 1:27 
AnswerRe: some problem with ResourceManager Pin
Pete O'Hanlon13-Aug-07 1:31
mvePete O'Hanlon13-Aug-07 1:31 
AnswerRe: some problem with ResourceManager Pin
Talal Sultan13-Aug-07 2:17
Talal Sultan13-Aug-07 2:17 
GeneralRe: some problem with ResourceManager Pin
Areff13-Aug-07 2:42
Areff13-Aug-07 2:42 
AnswerRe: some problem with ResourceManager Pin
Talal Sultan13-Aug-07 2:53
Talal Sultan13-Aug-07 2:53 
Questionhow to synchronize static method/variable? Pin
e_b13-Aug-07 1:08
e_b13-Aug-07 1:08 
AnswerRe: how to synchronize static method/variable? Pin
Luc Pattyn13-Aug-07 1:23
sitebuilderLuc Pattyn13-Aug-07 1:23 
QuestionDataGridTextBoxColumn Text Committing problem Pin
srikanth42413-Aug-07 1:03
srikanth42413-Aug-07 1:03 
QuestionHelp regarding row height in datagridview control Pin
anu8113-Aug-07 0:57
anu8113-Aug-07 0:57 
AnswerRe: Help regarding row height in datagridview control Pin
sathish s13-Aug-07 2:51
sathish s13-Aug-07 2:51 
GeneralRe: Help regarding row height in datagridview control Pin
anu8113-Aug-07 3:21
anu8113-Aug-07 3:21 
QuestionTab Order Pin
Sunshine Always13-Aug-07 0:55
Sunshine Always13-Aug-07 0:55 
AnswerRe: Tab Order Pin
Luc Pattyn13-Aug-07 1:27
sitebuilderLuc Pattyn13-Aug-07 1:27 
AnswerRe: Tab Order Pin
kubben13-Aug-07 3:07
kubben13-Aug-07 3:07 
QuestionSFTP, Tamir Pin
GeorgeBerry13-Aug-07 0:46
GeorgeBerry13-Aug-07 0:46 
AnswerRe: SFTP, Tamir Pin
Pete O'Hanlon13-Aug-07 1:14
mvePete O'Hanlon13-Aug-07 1:14 
QuestionRe: SFTP, Tamir Pin
GeorgeBerry13-Aug-07 4:43
GeorgeBerry13-Aug-07 4:43 
AnswerRe: SFTP, Tamir Pin
Ravi Bhavnani13-Aug-07 2:14
professionalRavi Bhavnani13-Aug-07 2:14 
GeneralRe: SFTP, Tamir Pin
GeorgeBerry14-Aug-07 1:13
GeorgeBerry14-Aug-07 1:13 
QuestionData Grid problem Pin
Janu_M13-Aug-07 0:14
Janu_M13-Aug-07 0:14 
Hi I am developing a windows application (VS 2003) in which it contains some buttins and a grid. The Grid has to show all the data from a csv file, for this i am reading all the data from csv file into datatable and giving that datatable as a datasource to data grid.

dtTable = new DataTable();
dtTable.Columns.Add("Name");
dtTable.Columns.Add("Time1");
dtTable.Columns.Add("Time2");
dtTable.Columns.Add("Path");
dtTable.Columns.Add("IconName");
dtTable.AcceptChanges();

if(File.Exists(Application.StartupPath + "\\Recordings.csv"))
{
StreamReader sreader = new StreamReader(Application.StartupPath + "\\File.csv");
string strval = sreader.ReadLine();
while (strval != null)
{
DataRow row1 = dtTable.NewRow();
string[] str = strval.Split(',');
for(int i = 0; i < str.Length; i++)
{
row1[i] = str[i];
}
dtTable.Rows.Add(row1);
strval = sreader.ReadLine();
}
dtTable.AcceptChanges();
sreader.Close();
// }
dtGrid.DataSource = dtTable;
dtGrid.Refresh();

I am using the above code for showing the contents of file to Grid.

if user clicks start button on the form, after completing the action i want to add a row to grid. For this i am writing the new row to the CSV file and calling the above code.

But it is giving error: "Controls created on one thread cannot be parented to a control on a different thread."

Any one please help me.
Thanks in Advance

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.