Click here to Skip to main content
15,916,042 members
Home / Discussions / C#
   

C#

 
GeneralRe: Pass Reference or Return Value Pin
Roger Alsing28-May-08 10:46
Roger Alsing28-May-08 10:46 
GeneralRe: Pass Reference or Return Value Pin
User 665828-May-08 18:45
User 665828-May-08 18:45 
QuestionC# RPC from JAVA Pin
xlthim28-May-08 8:08
xlthim28-May-08 8:08 
AnswerRe: C# RPC from JAVA Pin
Judah Gabriel Himango28-May-08 12:32
sponsorJudah Gabriel Himango28-May-08 12:32 
QuestionFortran DLL in C#? Pin
sharp_k28-May-08 7:34
sharp_k28-May-08 7:34 
AnswerRe: Fortran DLL in C#? Pin
Judah Gabriel Himango28-May-08 12:37
sponsorJudah Gabriel Himango28-May-08 12:37 
QuestionAborting a method in c# Pin
WebMaster28-May-08 7:34
WebMaster28-May-08 7:34 
AnswerRe: Repost Pin
Gareth H28-May-08 7:41
Gareth H28-May-08 7:41 
GeneralRe: Repost Pin
WebMaster28-May-08 7:45
WebMaster28-May-08 7:45 
GeneralRe: Repost Pin
Brady Kelly28-May-08 8:35
Brady Kelly28-May-08 8:35 
GeneralRe: Repost Pin
Thomas Stockwell30-May-08 10:50
professionalThomas Stockwell30-May-08 10:50 
GeneralRe: Repost Pin
WebMaster31-May-08 7:15
WebMaster31-May-08 7:15 
AnswerRe: Aborting a method in c# Pin
Anthony Mushrow28-May-08 8:37
professionalAnthony Mushrow28-May-08 8:37 
GeneralRe: Aborting a method in c# Pin
WebMaster29-May-08 22:48
WebMaster29-May-08 22:48 
AnswerRe: Aborting a method in c# Pin
MarkB77728-May-08 12:28
MarkB77728-May-08 12:28 
QuestionDataGridView InvalidOperationException re-entrancy issue when setting its DataSource to null Pin
Cyrilix28-May-08 7:22
Cyrilix28-May-08 7:22 
I'm getting an InvalidOperationException with the following message:

"Operation is not valid because it results in a reentrant call to the SetCurrentCellAddressCore function."

Essentially, the context is this:

Initially, I do something like this:

BindingSource bds = new BindingSource(dataSet1, dataTableString1);
dataGridView1.DataSource = bds;


But, say I perform an operation on the datagrid which makes me want to reload the entire datagrid. What I do is something like this:

dataGridView1.DataSource = null;
dataGridView1.DataBindings.Clear();
dataSet1.Clear();

//Retrieve data from the SqlAdapter and re-bind the datagridview
sqlDataAdapter1.Fill(dataSet1);
BindingSource bds = new BindingSource(dataSet1, dataTableString1);
dataGridView1.DataSource = bds;


The exception is thrown on the first statement when the data source is set to null. I've looked around and it seems like various situations will cause this issue, but not enough to give me a good idea on how to fix it.
AnswerRe: DataGridView InvalidOperationException re-entrancy issue when setting its DataSource to null Pin
leppie28-May-08 21:28
leppie28-May-08 21:28 
GeneralRe: DataGridView InvalidOperationException re-entrancy issue when setting its DataSource to null Pin
Cyrilix28-May-08 22:59
Cyrilix28-May-08 22:59 
GeneralRe: DataGridView InvalidOperationException re-entrancy issue when setting its DataSource to null Pin
leppie29-May-08 0:47
leppie29-May-08 0:47 
GeneralRe: DataGridView InvalidOperationException re-entrancy issue when setting its DataSource to null Pin
sanme985-Aug-08 15:26
sanme985-Aug-08 15:26 
GeneralRe: DataGridView InvalidOperationException re-entrancy issue when setting its DataSource to null Pin
Cyrilix5-Aug-08 17:47
Cyrilix5-Aug-08 17:47 
QuestionUsing Resources Pin
ejohns8528-May-08 6:31
ejohns8528-May-08 6:31 
AnswerRe: Using Resources Pin
leppie28-May-08 6:43
leppie28-May-08 6:43 
GeneralRe: Using Resources Pin
ejohns8528-May-08 7:00
ejohns8528-May-08 7:00 
GeneralRe: Using Resources Pin
Gareth H28-May-08 7:32
Gareth H28-May-08 7: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.