Grid View in User Control Giving Problem

Last post 05-17-2008 11:22 AM by Samu Zhang - MSFT. 3 replies.

Sort Posts:

  • Grid View in User Control Giving Problem

    05-15-2008, 3:53 AM
    • Member
      86 point Member
    • Radiant
    • Member since 10-18-2006, 8:03 AM
    • Posts 36

    Hi all,

    I am working on a webpage for project management. I am trying to implement all of these functionality through user control concept. One of the user control is having GridView which will show the user id and email id. From this, user can edit their email id.

    When user clicks on edit link, row state is changing to EDIT mode and when user clicks on Update link, update event is also firing. But, there, RowState is showing as Normal instead of Edit. Because of this, user changes are not updating in the database. I am wondering why GridView is behaving like this when I use it with User Control.

    While I try to use the same functionality with .aspx page, everything is working fine.

    Can anybody suggest me with an appropriate suggestion for this? I should submit my project by today evening. So, its a big urgent. Please help me ASAP.

    For further information have a look at the below link

    http://forums.asp.net/t/1261468.aspx


    Thanks in advance. Will be waiting for your answer.

     

  • Re: Grid View in User Control Giving Problem

    05-15-2008, 5:30 AM
    • Contributor
      2,298 point Contributor
    • Raggers
    • Member since 02-17-2006, 4:40 PM
    • Germany
    • Posts 388

     May be EnableView state for your usercontrol is false.Check your code everything seems right .

    In your GVEscalation_RowUpdating  Event

    why dont u use e.NewValues and e.Oldvalues rather than finding each field in gridrow .

     

    If this solves your problem please mark as answer
  • Re: Grid View in User Control Giving Problem

    05-15-2008, 6:26 AM
    • Member
      86 point Member
    • Radiant
    • Member since 10-18-2006, 8:03 AM
    • Posts 36

     

    Thanks for you quick reply, I have placed explicitly placed EnableViewState = true and another thing is

    e.NewValues and e.OldValues are also giving nulls in the user control.

     Hope i am missing some thing. But when i place the same code out side in an aspx page its working fine.

    Don't know exactly where the problem is.

     

  • Re: Grid View in User Control Giving Problem

    05-17-2008, 11:22 AM
    Answer

     Hi Radiant,

    I have answered you in that link, you can follow in that thread.

     

     


    Samu Zhang
    Microsoft Online Community Support

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question.
Page 1 of 1 (4 items)