Need help- Dataview row index issue

Discussion in 'ASP .Net' started by sri, Sep 8, 2003.

  1. sri

    sri Guest

    Hi,

    I have a datatable to store some values like name, id etc. in ASP.NET
    I have scenario where i need to modify more than one records of the
    datatable . I am trying to use dataview as below.

    If mdviewmodifyGroup.Count > 0 Then
    mdviewmodifyGroup.AllowEdit = True

    For pintCount = 0 To mdviewmodifyGroup.Count - 1
    mdviewmodifyGroup(pintCount).BeginEdit()
    mdviewmodifyGroup(pintCount)("Name") = txtModifyName.Text
    mdviewmodifyGroup(pintCount).EndEdit()
    Next
    end if

    In the for loop, the first record gets updated and then it throws me
    following exception.

    "Index 1 is not non-negative and below total rows count" ???
    I dont understand what i am doing wrong..? I checked the count of
    mdviewmodifyGroup.Count and its grater than 1 (usually 2 or 3 in my case)

    Please let me know how i can get around this issue..? any help or pointers
    inthis will be greatly appreciated.

    TIA,
    -sri
     
    sri, Sep 8, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. CodeMonkey
    Replies:
    1
    Views:
    730
    joyal jhaveri
    Feb 4, 2011
  2. Paul

    Needed: Index to a selected DataView row

    Paul, Dec 8, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    3
    Views:
    159
  3. troutbum

    Cannot Find Row Index after using row filter

    troutbum, Jan 22, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    10
    Views:
    483
    Andre
    Feb 19, 2004
  4. Tomasz Chmielewski

    sorting index-15, index-9, index-110 "the human way"?

    Tomasz Chmielewski, Mar 4, 2008, in forum: Perl Misc
    Replies:
    4
    Views:
    307
    Tomasz Chmielewski
    Mar 4, 2008
  5. Giggle Girl

    ie6 Insert Row at specific Row Index of Table

    Giggle Girl, Feb 5, 2006, in forum: Javascript
    Replies:
    18
    Views:
    281
    Thomas 'PointedEars' Lahn
    Feb 7, 2006
Loading...

Share This Page