Aspxgridview not updating
Hi Peter, Thanks, here's a very simple implementation of the code.I have one ddl that lists employee names and the value of each listitem is the employeeid.The gridview lists just a few fields and when I set up the datasource for it I set a default value for employeeid. But when I load the page, even though there's a default value, I get no results.When I select anything from the ddl I get no results.I do get back results if I provide one value for any of the parameters, so this should work fine: I'm trying to make this as simple as I can and reproduce it.I created my page below which has just one dropdownlist with an autopostback. I've never used that parameter before, but it did the trick!I was able to edit items in it without any problems.
I have a data gridview that has the sql data source.
It seems to me that you put too many parameters in your Selecet Parameters.
You may need just the ddl selected value of the controlparameter.
Customer ID) AS Full Name, [Payment Is Sent], [item Is Received], [Label Is Sent], Email Address, Payment Method, Payment Amount FROM [Orders] INNER JOIN Customers ON Orders. Customer ID " Update Command="UPDATE [Orders] SET [Payment Is Sent] = @Payment Is Sent, [item Is Received] = @item Is Received, [Label Is Sent] = @Label Is Sent, Payment Method = @Payment Method, Payment Amount = @Payment Amount WHERE [Order ID] = @original_Order ID" I found out what the problem was...
i took out the original_order ID and replaced it with order ID and now it is working fine, I don't know where original_order ID came from, VS automatically created that value for me.