473,587 Members | 2,463 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error : There is no row at position 1, Using DataRowVersion

5 New Member
I am using a grid, in which dynamically creating some columns and rows and EDIT buttons. While Updating the rows I am comparing DataRowVersion. Original and DataRowVersion. Current .

Its working fine when I did it first time, but when do it second time for another Edit and Update button. It shows the similar problem.
"There is no row at position 1"
Here is the code in Update button.
Expand|Select|Wrap|Line Numbers
  1. showMessage(){
  2.   var message = document.getElementById('<%=Message.ClientID %>');
  3.   if(message)
  4.   {
  5.     message.style.display='block';
  6.   }
  7. }
  8. for (int i = 0;i < dtDataChange.Columns.Count;++i)
  9. {
  10.    if (Convert.ToString(dtDataChange.Rows[iIndex][i, DataRowVersion.Original]) != Convert.ToString(dtDataChange.Rows[iIndex][i, DataRowVersion.Current]))
  11.   {
  12.     String sCol = dtDataChange.Columns[i].ColumnName.ToString();
  13.     String sVal = dtDataChange.Rows[iIndex][i].ToString();
  14.  
  15.   }
  16. }

Thanks for helping hands in advance.
Alok
Sep 15 '09 #1
5 3848
alokmishra2003
5 New Member
I got my answer this time from some other place.
Sep 16 '09 #2
jhardman
3,406 Recognized Expert Specialist
Alok,

You have mistakenly posted in the ASP Classic forum instead of the ASP.NET forum. I have moved your post for you. I am glad you found an answer. Is there any chance you could post it here?

Jared
Sep 16 '09 #3
alokmishra2003
5 New Member
Thank u Sir for correcting me. You are right, it was in wrong place.
Sep 16 '09 #4
Frinavale
9,735 Recognized Expert Moderator Expert
What was the answer?
Sep 16 '09 #5
alokmishra2003
5 New Member
I was using iIndexin above code, insetad of this I was to use only [0]. After that after clicking in any row I got all the correct values from the grid.

I was clicking first row UPDATE button first, all the time, so didnt get any error first time, because its Index was 0. But when next time I clicked UPDATE button of some another row, then it creates the problem.
Thanks & Regards
Alok
Sep 17 '09 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1661
by: Renae | last post by:
Probably been asked before but I cannot find a resolution: I receive the following error when calling a stored proc in Oracle but this works with v1.0 of the framework: The OracleParameter with ParameterName 'p_Subscriber_ID' is already contained by another OracleParameterCollection. Any help would be appreciated!
2
4057
by: Jason (Kusanagihk) | last post by:
To all, I am writing a C# application; I've a DataGrid to show and edit data; then I tried to update the updated data by calling ADO_Adapter.update (ADO_DataSet, "TableName"); But it pop up a DBConcurrencyException! Anyone get ideas on how to properly use DataGrids and DataSets together ???
7
1654
by: Leon Shaw | last post by:
Need help understanding? Server Error in '/solo' Application. ---------------------------------------------------------------------------- ---- Object must implement IConvertible. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
0
1896
by: zhaoJian | last post by:
Here it is my code ,but it can't update the database.How to do it ? In _UpdateUnit event, I can not get the original value to @Original_UnitID,so I set a hidden column named LabelKey.But It don't update the database.My server is SqlServer 2000. using System; using System.Collections;
5
2217
by: Gene | last post by:
What can I do if I want to get the result using the sql command? for example, the select command is "select Name from Employee where StaffID=10" How to get the "Name"??? dim Name as string and then..... what should I do?
3
2428
by: Adriano | last post by:
Hello, when I try to print something, either DataGrid or from Crystal Report viever the folowing error message appears and cancels printing: Object reference not set to an instance of an object :(((( Anyone pls help me to solve this problem!!! thanks in advance,
6
2448
by: Mikey G | last post by:
Hi, Here is a shorter code example since the last message I posted got truncated. So the problem is I created a simple VB.NET 2003 application through Visual Studio that connects to a MySQL database and loads a table into a Dataset, and then displays that table information in a DataGrid on a form for editing. The table fill works fine, the delete function works fine, but when I try to update a row, the application fails with the...
0
4527
by: Mateusz [PEYN] Adamus | last post by:
Hi I have a Typed DataSet. I've databinded it to some text controls on my form, controls show data when I show record. But now I would like to create a new record with this form, controls and dataset. A add new row to dataset: <C#>
2
4197
by: slinky | last post by:
I'm getting a error when I open my . aspx in my browser... line 34: da.Fill(ds, "Assets") Here's the error and my entire code for this .aspx.vb is below that ... I need some clues as to what is causing the error... Thanks!!! Server Error in '/' Application. ---------------------------------------------------------------------------­----- Multiple-step OLE DB operation generated errors. Check each OLE DB
0
8219
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
7978
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8221
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6629
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5722
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5395
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3882
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2364
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1192
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.