Click here to Skip to main content
15,897,891 members
Home / Discussions / C#
   

C#

 
Questionxml encoding Pin
mrnoname5-Sep-05 6:27
mrnoname5-Sep-05 6:27 
QuestionIntelligent Datagrid in C# Pin
| Muhammad Waqas Butt |5-Sep-05 6:09
professional| Muhammad Waqas Butt |5-Sep-05 6:09 
AnswerRe: Intelligent Datagrid in C# Pin
tolgattt5-Sep-05 10:35
tolgattt5-Sep-05 10:35 
GeneralRe: Intelligent Datagrid in C# Pin
| Muhammad Waqas Butt |6-Sep-05 22:49
professional| Muhammad Waqas Butt |6-Sep-05 22:49 
QuestionIntelligent Datagrid Pin
| Muhammad Waqas Butt |5-Sep-05 6:08
professional| Muhammad Waqas Butt |5-Sep-05 6:08 
QuestionUse MeasureDisplayStringWidth to Set Button.Width property Pin
ehollar5-Sep-05 5:46
ehollar5-Sep-05 5:46 
AnswerRe: Use MeasureDisplayStringWidth to Set Button.Width property Pin
ehollar5-Sep-05 12:26
ehollar5-Sep-05 12:26 
QuestionSystem.Data.NoNullAllowedException Pin
rich_wenger5-Sep-05 5:19
rich_wenger5-Sep-05 5:19 
I've used VS2003 Wizard to create sqlDataAdapter, stored procedures, and dataset on my application. I can search and update fine but Insert has error unless I perform a search or update prior to my insert. Any ideas on how to work around this without rewriting the database?Sigh | :sigh:

Code Snippet ================================================================

static void Main()
{
Application.Run(new Form1());
}

private void menuItem2_Click(object sender, System.EventArgs e)
{
//Initialize Staff Physician Screen
SetupStaffPhysician();
menuItem2.Enabled = false;
}

private void menuItem3_Click(object sender, System.EventArgs e)
{
//Exit Application
Application.Exit();
}
private void SetupStaffPhysician()
{
panel1.Visible = true;
this.comboBox1.DataBindings.Add(new System.Windows.Forms.Binding("SelectedIndex", this.dsStaffPhysicians1, "tblStaffPhysicians.docLicenseState"));
}
private void ClearStaffPhysicians()
{
textBox1.Text = "";
textBox2.Text = "";
textBox3.Text = "";
textBox4.Text = "";
textBox5.Text = "";
comboBox1.SelectedIndex = 0;
}

private void btnSearch_Click(object sender, System.EventArgs e)
{
sqlDataAdapter1.SelectCommand.Parameters["@Param2"].Value = textBox3.Text;
dsStaffPhysicians1.Clear();
sqlDataAdapter1.Fill(dsStaffPhysicians1);
}

private void btnReset_Click(object sender, System.EventArgs e)
{
this.dsStaffPhysicians1.Clear();
ClearStaffPhysicians();
}

private void btnUpdate_Click(object sender, System.EventArgs e)
{
this.BindingContext[dsStaffPhysicians1, "tblStaffPhysicians"].EndCurrentEdit();
sqlDataAdapter1.Update(dsStaffPhysicians1);
sqlDataAdapter1.Fill(dsStaffPhysicians1);
}

private void btnInsert_Click(object sender, System.EventArgs e)
{

this.BindingContext[dsStaffPhysicians1, "tblStaffPhysicians"].AddNew();
ClearStaffPhysicians();
}

private void btnCommit_Click(object sender, System.EventArgs e)
{

this.BindingContext[dsStaffPhysicians1, "tblStaffPhysicians"].EndCurrentEdit();
sqlDataAdapter1.Update(dsStaffPhysicians1);
}


}
}



"She folds her legs...in doing so I glimpse Xanadu."--Gilby
QuestionRichtextBox Problem Pin
snouto5-Sep-05 5:07
snouto5-Sep-05 5:07 
AnswerRe: RichtextBox Problem Pin
philip_cole5-Sep-05 6:20
philip_cole5-Sep-05 6:20 
QuestionType casting issue Pin
arusmemon5-Sep-05 4:51
arusmemon5-Sep-05 4:51 
AnswerRe: Type casting issue Pin
Luis Alonso Ramos5-Sep-05 14:35
Luis Alonso Ramos5-Sep-05 14:35 
QuestionDate Time Picker MinMaxDate Pin
Greeky5-Sep-05 4:34
Greeky5-Sep-05 4:34 
AnswerRe: Date Time Picker MinMaxDate Pin
Luis Alonso Ramos5-Sep-05 7:22
Luis Alonso Ramos5-Sep-05 7:22 
QuestionThe weird control problem Pin
doph5-Sep-05 4:34
doph5-Sep-05 4:34 
QuestionDLL in C++ with pointers. How to use it in C#? Pin
patgo5-Sep-05 4:18
patgo5-Sep-05 4:18 
AnswerRe: DLL in C++ with pointers. How to use it in C#? Pin
RobVai6-Sep-05 16:37
RobVai6-Sep-05 16:37 
QuestionDelay during first use of Exception Pin
harwanegg5-Sep-05 3:28
harwanegg5-Sep-05 3:28 
AnswerRe: Delay during first use of Exception Pin
Andy Brummer5-Sep-05 4:12
sitebuilderAndy Brummer5-Sep-05 4:12 
AnswerRe: Delay during first use of Exception Pin
Daniel Turini5-Sep-05 6:38
Daniel Turini5-Sep-05 6:38 
GeneralRe: Delay during first use of Exception Pin
harwanegg5-Sep-05 20:21
harwanegg5-Sep-05 20:21 
QuestionT-SQL Clause Pin
Greeky5-Sep-05 3:18
Greeky5-Sep-05 3:18 
AnswerRe: T-SQL Clause Pin
Andy Brummer5-Sep-05 4:20
sitebuilderAndy Brummer5-Sep-05 4:20 
QuestionNumber Formatting Pin
Brendan Vogt5-Sep-05 1:56
Brendan Vogt5-Sep-05 1:56 
AnswerRe: Number Formatting Pin
Guffa5-Sep-05 2:37
Guffa5-Sep-05 2:37 

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.