Click here to Skip to main content
15,892,737 members
Home / Discussions / C#
   

C#

 
AnswerSolution : Dynamic images in imagelist-Urgent!!!!!!!!!!!!!! Pin
tanishq151013-Oct-05 5:09
tanishq151013-Oct-05 5:09 
Questionowndraw for a scrollbar Pin
Sasuko11-Oct-05 21:29
Sasuko11-Oct-05 21:29 
AnswerRe: owndraw for a scrollbar Pin
David Stone12-Oct-05 6:56
sitebuilderDavid Stone12-Oct-05 6:56 
QuestionWindows Search Gif Pin
Greeky11-Oct-05 20:40
Greeky11-Oct-05 20:40 
AnswerRe: Windows Search Gif Pin
XRaheemX13-Oct-05 3:48
XRaheemX13-Oct-05 3:48 
GeneralRe: Windows Search Gif Pin
Greeky13-Oct-05 3:57
Greeky13-Oct-05 3:57 
QuestionC# and animated GIFs (VS.Net 2003) Pin
raysot77711-Oct-05 19:14
raysot77711-Oct-05 19:14 
Questiondataadapter fill question Pin
theStorminMormon11-Oct-05 16:49
theStorminMormon11-Oct-05 16:49 
I have a table. When you select a plan from a listbox and click 'select plan', the program nicely goes out to the database, fetches the plan, and sticks it in a datagrid.

This is the code:

this.sqlSelectCommand1.CommandText += " WHERE PlanID = '" + PlanIDs[this.clstbxPlans.SelectedIndex].ToString() + "'";

this.sqlDataAdapter.Fill(dataSet2);
this.dgClaimsExperience.DataSource = this.dataSet2.tblData;


So I'm using data adapter, data connection and data set that I generated via the vs2003 GUI.

Anyway it works just fine with two problems.

If, after loading one plan, the user selects a different plan and clicks "select plan", I want the new plan to get loaded into the data grid and replace the old one. That's what the "WHERE Plan ID..." part of the code does. It uses the list box and an array of PlanIDs to specify which plan data I wanted loaded. But when I actually try to change plans this way I get an error:

An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in system.data.dll

Additional information: System error.

What gives?

My second (more minor) problem is that when the data is loaded into the datagrid, it's too large too fit. This is OK, the data grid has scroll bars. But the problem is that the scroll bars are disabled by default for some reason. I can navigate around easily enough by just plopping my cursor in the data table and manually moving the cursor around the arrow keys - but what do I need to do to get the scroll bars to work like they should?

I appreciate the help. This project is killing me.

-stormin

The ends can never justify the means. It is the means that determine the ends.
AnswerRe: dataadapter fill question Pin
Wjousts12-Oct-05 3:38
Wjousts12-Oct-05 3:38 
GeneralRe: dataadapter fill question Pin
theStorminMormon12-Oct-05 4:17
theStorminMormon12-Oct-05 4:17 
GeneralRe: dataadapter fill question Pin
Wjousts12-Oct-05 7:42
Wjousts12-Oct-05 7:42 
GeneralRe: dataadapter fill question Pin
theStorminMormon14-Oct-05 7:01
theStorminMormon14-Oct-05 7:01 
Questionadminstrator Pin
momoo11-Oct-05 16:47
momoo11-Oct-05 16:47 
AnswerRe: adminstrator Pin
Dave Kreskowiak12-Oct-05 3:50
mveDave Kreskowiak12-Oct-05 3:50 
QuestionWTF is my task list? Pin
theStorminMormon11-Oct-05 16:18
theStorminMormon11-Oct-05 16:18 
AnswerRe: WTF is my task list? Pin
leppie11-Oct-05 16:21
leppie11-Oct-05 16:21 
GeneralRe: WTF is my task list? Pin
theStorminMormon11-Oct-05 16:43
theStorminMormon11-Oct-05 16:43 
AnswerRe: WTF is my task list? Pin
tatchung11-Oct-05 16:40
tatchung11-Oct-05 16:40 
AnswerRe: WTF is my task list? Pin
Andy Brummer12-Oct-05 12:10
sitebuilderAndy Brummer12-Oct-05 12:10 
QuestionHow to custom funcation in Excel2003 with C# Pin
dreamwinter11-Oct-05 15:38
dreamwinter11-Oct-05 15:38 
AnswerRe: How to custom funcation in Excel2003 with C# Pin
David Stone12-Oct-05 7:03
sitebuilderDavid Stone12-Oct-05 7:03 
QuestionDataBound TreeView + DataBinding + DataGrid Pin
Bahadir Cambel11-Oct-05 13:51
Bahadir Cambel11-Oct-05 13:51 
AnswerRe: DataBound TreeView + DataBinding + DataGrid Pin
Bahadir Cambel14-Oct-05 0:10
Bahadir Cambel14-Oct-05 0:10 
QuestionRTSP client/server Pin
waleed_marji11-Oct-05 11:29
waleed_marji11-Oct-05 11:29 
QuestionKeeping External App from closing or being minimized Pin
DeepToot11-Oct-05 11:22
DeepToot11-Oct-05 11:22 

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.