Aspxgridview not updating
Back Color="White" Border Color="#999999" Border Style="Solid" Border Width="1px" Cell Padding="3" Data Source ID="Sql Data Source Orders" Fore Color="Black" Grid Lines="Vertical" Auto Generate Edit Button="True" Empty Data Text="Not Available" Auto Generate Columns="False" Data Key Names="Order ID" Width="800px"" Select Command="SELECT [Order ID], (SELECT First Name ' ' Last Name AS 'Full Name' FROM Customers WHERE Customer ID=Orders.
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"" Select Command="SELECT [Order ID], (SELECT First Name ' ' Last Name AS 'Full Name' FROM Customers WHERE Customer ID=Orders.
I also have SQL Profiler running and I can see that the query ius NOT being sent to the database on postback.
I'm not sure what I'm missing here, but I've run out of ideas...
So what I'd like is for the gridview to update every time a value is changed in the any of the form fields.
I set them all (except the text boxes of course) to Auto Postback, but when any of the dropdownlists are changed the query is not sent to the database and the gridview continues to display the empty dataset message.
Peter: Sorry, I don't have ANY code in the codebehind for this test.
You may need just the ddl selected value of the controlparameter.
Here's the entire code for the aspx page: Limno: Here's the code for the stored procedure.
I'm only using one parameter in this test to simplify things.
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.