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. -
showMessage(){
-
var message = document.getElementById('<%=Message.ClientID %>');
-
if(message)
-
{
-
message.style.display='block';
-
}
-
}
-
for (int i = 0;i < dtDataChange.Columns.Count;++i)
-
{
-
if (Convert.ToString(dtDataChange.Rows[iIndex][i, DataRowVersion.Original]) != Convert.ToString(dtDataChange.Rows[iIndex][i, DataRowVersion.Current]))
-
{
-
String sCol = dtDataChange.Columns[i].ColumnName.ToString();
-
String sVal = dtDataChange.Rows[iIndex][i].ToString();
-
-
}
-
}
Thanks for helping hands in advance.
Alok
5 3848
I got my answer this time from some other place.
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
Thank u Sir for correcting me. You are right, it was in wrong place.
Frinavale 9,735
Recognized Expert Moderator Expert
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
Sign in to post your reply or Sign up for a free account.
Similar topics |
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!
|
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
???
|
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.
|
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;
|
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?
| |
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,
|
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...
|
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#>
|
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
|
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...
|
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,...
| |
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...
|
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...
|
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...
|
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();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |
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...
| | |