none
Databound ASP.NET Gridview does not reflect updated values. RRS feed

  • Question

  • I am using .NET framework with C# in Visual Studio 2017 with the database as SQL Server Mgmt. Studio 2014.

    In my Web Form , I have an <asp:GridView> bound to SqlDataSource amongst other controls.

    I have added a command template field with Edit and Delete buttons. The first ID column has Edit Item Template with a DropDown List that is bound to another SqlDataSource .

    On clicking Edit , the drop down list is displayed and allows me to select an ID but on clicking the Update button the Grid View displays the original values itself . The changes are not reflected in the database either .

    I am quite new to coding and to this forum so I apologize for any rookie errors !

    Any valuable suggestions on this issue would be much appreciated ! Thanks .


    • Edited by Ariadne99 Tuesday, March 17, 2020 11:35 AM
    • Moved by CoolDadTx Tuesday, March 17, 2020 2:10 PM ASP.NET related
    Tuesday, March 17, 2020 11:33 AM

All replies

  • ASP.NET Webform controls can be discussed at ASP.NET forums.

    http://forums.asp.net/

    Tuesday, March 17, 2020 11:56 AM
  • Hello,

    Take a look at this code sample.

    Learn how to use the Visual Studio debugger, setting breakpoints and examining variables. Its extremely common for new developers to avoid learning how to debug code while learning this skill in many cases can a) point to an issue b) point to an issue with a solution c) allow an issue to be discussed in forums such as these. 

    As mentioned, use the ASP.NET forums for assistance.


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    Tuesday, March 17, 2020 12:23 PM