S
sri
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
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