Click here to Skip to main content
15,913,685 members
Home / Discussions / C#
   

C#

 
GeneralRe: Create application setup Pin
MoustafaS12-Nov-04 12:27
MoustafaS12-Nov-04 12:27 
GeneralCommand Parameter Issue Pin
RB@Emphasys12-Nov-04 5:48
RB@Emphasys12-Nov-04 5:48 
GeneralRe: Command Parameter Issue Pin
Richard Deeming12-Nov-04 6:27
mveRichard Deeming12-Nov-04 6:27 
GeneralRe: Command Parameter Issue Pin
RB@Emphasys12-Nov-04 7:54
RB@Emphasys12-Nov-04 7:54 
GeneralDataBind problem Pin
webhay12-Nov-04 3:18
webhay12-Nov-04 3:18 
GeneralRe: DataBind problem Pin
Skynyrd12-Nov-04 3:59
Skynyrd12-Nov-04 3:59 
GeneralRe: DataBind problem Pin
webhay12-Nov-04 4:58
webhay12-Nov-04 4:58 
GeneralRe: DataBind problem Pin
Skynyrd12-Nov-04 10:16
Skynyrd12-Nov-04 10:16 
Ok, I haven't seen your code so I'm not sure if this is your problem, but it does sound like it is:

Whats probably happening is that u are databinding the second combobox in the form's contructor or in any other method that runs before the Load event and thus the second combobox's databinding is active when u start filling the first combobox. The Fill method is triggering ur probable SelectedIndexChanged event on ur first Cbo and thats whats causing the problem. U cant have that event happening while ur first dataset is filling. Your sqltextcommand will not build right because it cant read a loading datatable: thats why ur getting the error "The Column prefix 'System.Data' does not match with a table name or alias name used in the query". It's because SelectedValue is probably giving u the type of the ValueMember ("System.Data.DataViewManagerListItemTypeDescriptor") because it can't read anything else at that point.

Solutions:

Link the SelectedIndexChanged event manually in the LoadForm event handler (not through designer which links it in the constructor) , AFTER ur first cbobox code.

Best soltion: If ur sure that u only want the event to happen when a user commits a change in the first cbobox, then use the SelectionChangeCommitted event. U can link this one from the designer as it will only fire when a user changes the selected index. It wont fire with a code induced change.

Check and seee if this fixes the problem.

P.D. Recheck the code in ur second cbobox, ur databinding the wrong ComboBox....i think.
GeneralRe: DataBind problem Pin
webhay18-Nov-04 4:04
webhay18-Nov-04 4:04 
QuestionOnline Database? Pin
The underdog12-Nov-04 3:13
The underdog12-Nov-04 3:13 
AnswerRe: Online Database? Pin
Colin Angus Mackay12-Nov-04 7:15
Colin Angus Mackay12-Nov-04 7:15 
GeneralC# form_load event Pin
Phil Finlay12-Nov-04 3:05
Phil Finlay12-Nov-04 3:05 
GeneralRe: C# form_load event Pin
Skynyrd12-Nov-04 4:09
Skynyrd12-Nov-04 4:09 
GeneralRe: C# form_load event Pin
Phil Finlay12-Nov-04 5:47
Phil Finlay12-Nov-04 5:47 
GeneralRe: C# form_load event Pin
Skynyrd12-Nov-04 10:26
Skynyrd12-Nov-04 10:26 
GeneralRe: C# form_load event Pin
Phil Finlay15-Nov-04 9:15
Phil Finlay15-Nov-04 9:15 
GeneralRichTextBox and DetectUrls Pin
benjymous12-Nov-04 1:51
benjymous12-Nov-04 1:51 
GeneralRe: Recursion (Can someone walk through cheese?) Pin
benjymous12-Nov-04 0:44
benjymous12-Nov-04 0:44 
GeneralRe: Recursion (Can someone walk through cheese?) Pin
Sebastian Schneider12-Nov-04 1:58
Sebastian Schneider12-Nov-04 1:58 
GeneralI'd like to use IPicture class using C# Pin
Anonymous12-Nov-04 0:37
Anonymous12-Nov-04 0:37 
GeneralCreating a table from code Pin
vog_ro12-Nov-04 0:31
vog_ro12-Nov-04 0:31 
GeneralRe: Creating a table from code Pin
David Salter12-Nov-04 2:33
David Salter12-Nov-04 2:33 
GeneralRetrieving a website name by its IP address Pin
Majid Shahabfar11-Nov-04 23:11
Majid Shahabfar11-Nov-04 23:11 
GeneralRe: Retrieving a website name by its IP address Pin
Sebastian Schneider11-Nov-04 23:29
Sebastian Schneider11-Nov-04 23:29 
GeneralRe: Retrieving a website name by its IP address Pin
David Salter11-Nov-04 23:39
David Salter11-Nov-04 23:39 

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.