Aspxgridview not updating
I have been looking into this all day and couldn't find out what is wrong.UPDATE [Orders] SET [Payment Is Sent] = @Payment Is Sent, [item Is Received] = @item Is Received, [item Is Sent] = @item Is Sent WHERE [Order ID] = @original_Order ID This is my update statement above.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.I'm sure it's something we are overlooking, I just don't see it.I think if I can load it into my vs and have a look, it will jump out at me.I was able to edit items in it without any problems.I added some more attributes in the select statement for more columns in the gridview, since then whenever I hit edit, then edit the status and click on update, the gridview goes back without editing anything.
calling databind() on the gridview, in my experience, always causes the select to be executed and then a round trip to the database which you should see in profiler.
I have a form with several dropdownlist boxes and a couple text boxes.
I have one gridview that takes all of the parameters the various form fields provide.
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.