datagridview automatically converting string to double
ravi kumar
331
Reputation points
I am trying to insert data from my datagridview to sql server but while saving the datatype of "material" is changing to double column
- I have double checked the datatype at my sql server
- I have double checked the datatype at dataset designer also
still while saving this is the end result
Please guide how to solve this .
Datagrid column property:
i am using "ADGV" nugget for datagridview
code for saving the data:
private void tool_ManagementBindingNavigatorSaveItem_Click(object sender, EventArgs e)
{
try
{
String msg = "Confirm Save?";
String caption = "Save Record";
MessageBoxButtons buttons = MessageBoxButtons.YesNo;
MessageBoxIcon ico = MessageBoxIcon.Question;
DialogResult result;
result = MessageBox.Show(this, msg, caption, buttons, ico);
if (result == DialogResult.Yes)
{
this.Validate();
this.tool_ManagementBindingSource.EndEdit();
this.tableAdapterManager.UpdateAll(this.pINQCDataSet);
MessageBox.Show("The Record saved Successfully", "Save_Update",
MessageBoxButtons.OK, MessageBoxIcon.Information);
//this.Close();
}
else
{
return;
}
}
catch (Exception ex)
{
MessageBox.Show("Saving Failed:" + ex.Message.ToString(), "Save",
MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
Developer technologies Windows Forms
1,931 questions
SQL Server Other
14,494 questions
Developer technologies C#
11,567 questions
Sign in to answer