Hi,
I'm having some trouble trying to insert my gridview data into a table using store procedure.
Here's the scenario:
I have a dataset1 with a query that selects about 20 columns from left outer joins 3 views (lets call them A, B, C views) and 1 table (D table).
I created a gridview that fills the gridview that the dataset... of the 20 columns 3 are hidden.
On this D table, I have one column that the cells are empty. This is where we need to enter the data during runtime.
I created a store procedure that will insert 5 columns from the dataset (3 of the hidden columns, 1 visible, and 1 column where we need to enter the value during runtime) using parameters
On my dataset1 configuration, I added a query that will execute the store procedure (lets call it InsertPIWidthTable, which is D table)
Problem:
I got my gridview to populate the data, but can't seem to get what I entered in the cell to store in my D Table. It says there is no argument given that correspond to the required parameter, but I have all the parameter names correct... So I stuck. Help?
I attached screenshots of everything. Thank you!
This is my code:
private void radGridView1_CellValueChanged(object sender, GridViewCellEventArgs e)
{
IEditableObject editableObject = e.Row.DataBoundItem as IEditableObject;
if (editableObject != null)
{
editableObject.EndEdit();
}
DataRowView dataRowView = e.Row.DataBoundItem as DataRowView;
if (dataRowView != null)
{
this.vW_ProdPrintPageTableAdapter.InsertPIWidthTable();
}