Click here to Skip to main content
15,901,505 members
Home / Discussions / C#
   

C#

 
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 
Questionauto-complete textbox with memory Pin
AndrusM28-May-08 6:00
AndrusM28-May-08 6:00 
AnswerRe: auto-complete textbox with memory Pin
leppie28-May-08 6:46
leppie28-May-08 6:46 
GeneralRe: auto-complete textbox with memory Pin
AndrusM28-May-08 7:21
AndrusM28-May-08 7:21 
GeneralRe: auto-complete textbox with memory Pin
leppie28-May-08 21:27
leppie28-May-08 21:27 
QuestionConnect to database via web service Pin
HenrydeSousa28-May-08 4:45
HenrydeSousa28-May-08 4:45 
AnswerRe: Connect to database via web service Pin
Gareth H28-May-08 7:39
Gareth H28-May-08 7:39 
GeneralRe: Connect to database via web service Pin
HenrydeSousa29-May-08 4:20
HenrydeSousa29-May-08 4:20 
QuestionWhat is the Error Pin
ASysSolvers28-May-08 4:33
ASysSolvers28-May-08 4:33 

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.