Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. DetailsView Update Problem

DetailsView Update Problem

Scheduled Pinned Locked Moved ASP.NET
sysadminhelpannouncement
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    RajpootRohan
    wrote on last edited by
    #1

    Hi to all, I am using DetailsView control to edit the details of the user. But when I click the Edit button, the update button is not clickable. I am unable to find out the problem. <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" CellPadding="4" DataSourceID="SqlDataSource1" ForeColor="#333333" GridLines="None" Height="50px" Width="364px" AutoGenerateEditButton="True" DataKeyNames="UserId" style="margin-right: 0px" onitemupdating="DetailsView1_ItemUpdating"> <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" /> <CommandRowStyle BackColor="#E2DED6" Font-Bold="True" /> <RowStyle BackColor="#F7F6F3" ForeColor="#333333" /> <FieldHeaderStyle BackColor="#E9ECF1" Font-Bold="True" /> <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" /> <Fields> <asp:BoundField DataField="UserId" HeaderText="UserId" ReadOnly="True" SortExpression="UserId" /> <asp:BoundField DataField="first_name" HeaderText="first_name" SortExpression="first_name" /> <asp:BoundField DataField="last_name" HeaderText="last_name" SortExpression="last_name" /> <asp:BoundField DataField="AddressLine1" HeaderText="address1" SortExpression="AddressLine1" /> <asp:BoundField DataField="AddressLine2" HeaderText="address2" SortExpression="AddressLine2" /> <asp:BoundField DataField="AddressLine3" HeaderText="address3" SortExpression="AddressLine3" /> <asp:BoundField DataField="zipcode" HeaderText="zipcode" SortExpression="zipcode" /> <asp:BoundField DataField="city" HeaderText="city" SortExpression="city" /> <asp:BoundField DataField="state" HeaderText="state" SortExpression="state" /> <asp:BoundField DataField="country" HeaderText="country" SortExpression="country" /> <asp:BoundField DataField="landline" HeaderText="landline" SortExpression="landline" /> <asp:BoundField DataField="mobile" HeaderText="mobile" SortExpression="mobile" />

    N 1 Reply Last reply
    0
    • R RajpootRohan

      Hi to all, I am using DetailsView control to edit the details of the user. But when I click the Edit button, the update button is not clickable. I am unable to find out the problem. <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" CellPadding="4" DataSourceID="SqlDataSource1" ForeColor="#333333" GridLines="None" Height="50px" Width="364px" AutoGenerateEditButton="True" DataKeyNames="UserId" style="margin-right: 0px" onitemupdating="DetailsView1_ItemUpdating"> <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" /> <CommandRowStyle BackColor="#E2DED6" Font-Bold="True" /> <RowStyle BackColor="#F7F6F3" ForeColor="#333333" /> <FieldHeaderStyle BackColor="#E9ECF1" Font-Bold="True" /> <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" /> <Fields> <asp:BoundField DataField="UserId" HeaderText="UserId" ReadOnly="True" SortExpression="UserId" /> <asp:BoundField DataField="first_name" HeaderText="first_name" SortExpression="first_name" /> <asp:BoundField DataField="last_name" HeaderText="last_name" SortExpression="last_name" /> <asp:BoundField DataField="AddressLine1" HeaderText="address1" SortExpression="AddressLine1" /> <asp:BoundField DataField="AddressLine2" HeaderText="address2" SortExpression="AddressLine2" /> <asp:BoundField DataField="AddressLine3" HeaderText="address3" SortExpression="AddressLine3" /> <asp:BoundField DataField="zipcode" HeaderText="zipcode" SortExpression="zipcode" /> <asp:BoundField DataField="city" HeaderText="city" SortExpression="city" /> <asp:BoundField DataField="state" HeaderText="state" SortExpression="state" /> <asp:BoundField DataField="country" HeaderText="country" SortExpression="country" /> <asp:BoundField DataField="landline" HeaderText="landline" SortExpression="landline" /> <asp:BoundField DataField="mobile" HeaderText="mobile" SortExpression="mobile" />

      N Offline
      N Offline
      Nishant Singh
      wrote on last edited by
      #2

      Hi Sneha , Be little more specific what is the problem

      R 1 Reply Last reply
      0
      • N Nishant Singh

        Hi Sneha , Be little more specific what is the problem

        R Offline
        R Offline
        RajpootRohan
        wrote on last edited by
        #3

        Hi Nishant, In the edit mode of the details view we have two buttons, update and cancel. Cancel is working fine. But the update button is not working.It is not clickable. Nothing is happening when I click on it. I even created a new page and applied the same code but of no use. I used details view several times but this time I am not able to solve the problem. If it is not updating the data, I can understand but the update button is not clickable is a strange behaviour.

        cheers, sneha

        N S 2 Replies Last reply
        0
        • R RajpootRohan

          Hi Nishant, In the edit mode of the details view we have two buttons, update and cancel. Cancel is working fine. But the update button is not working.It is not clickable. Nothing is happening when I click on it. I even created a new page and applied the same code but of no use. I used details view several times but this time I am not able to solve the problem. If it is not updating the data, I can understand but the update button is not clickable is a strange behaviour.

          cheers, sneha

          N Offline
          N Offline
          Nishant Singh
          wrote on last edited by
          #4

          Got the problem .....but not sure what exactly is causing the problem , Have u associated any event with update Command , or just check anywhere it is getting disabled or something in Control Render events.

          R 1 Reply Last reply
          0
          • R RajpootRohan

            Hi Nishant, In the edit mode of the details view we have two buttons, update and cancel. Cancel is working fine. But the update button is not working.It is not clickable. Nothing is happening when I click on it. I even created a new page and applied the same code but of no use. I used details view several times but this time I am not able to solve the problem. If it is not updating the data, I can understand but the update button is not clickable is a strange behaviour.

            cheers, sneha

            S Offline
            S Offline
            sashidhar
            wrote on last edited by
            #5

            sneha Choudhary wrote:

            But the update button is not working.

            oops ..! Sorry You Used the other way which you cant keep break point i didnt check it..!

            LatestArticle :Log4Net Why Do Some People Forget To Mark as Answer .If It Helps.

            1 Reply Last reply
            0
            • N Nishant Singh

              Got the problem .....but not sure what exactly is causing the problem , Have u associated any event with update Command , or just check anywhere it is getting disabled or something in Control Render events.

              R Offline
              R Offline
              RajpootRohan
              wrote on last edited by
              #6

              I checked the page source. I think here is the problem. The update button is this: <a href="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;ctl00$ContentPlaceHolder1$DetailsView1$ctl12&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, true))" style="color:#333333;">Update</a> I think it should be: <a href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$DetailsView1$ctl12','')" style="color:Black;">Update</a>

              cheers, sneha

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups