goneWildCoder
Programmer
I have a textbox driven windows form created in C# and linked to a dataset. On the form, I have an add button that should allow the user to add a new record. How do I create a new record in the dataset which would be updated with values from the user?
I tried the following:
/// <summary>
/// Add a new record
/// </summary>
private void addBtn_Click(object sender, System.EventArgs e)
{
this.BindingContext[this.salesDs1,"Salesperson"].AddNew();
}
which causes this error:
Error: Index and length must refer to a location within the string
Parameter name: length
Please help!!
I tried the following:
/// <summary>
/// Add a new record
/// </summary>
private void addBtn_Click(object sender, System.EventArgs e)
{
this.BindingContext[this.salesDs1,"Salesperson"].AddNew();
}
which causes this error:
Error: Index and length must refer to a location within the string
Parameter name: length
Please help!!