Row State
When we modify any row data that row status has been changed according to action. When we call AcceptChanges() method of dataset or Table, status of all rows changed to Unchanged.
And deleted rows has been removed from the dataset. But when we call RejectChanges all Added rows has been deleted and deleted rows recovered and status of all rows set to Unchanged.
When we use Fill method to fill the dataset than all row’s status will be Unchanged initially until unless any change has been done.
Row State Description
Unchanged It means there is no change in row’s data.
Added It means row has been added in dataset.
Modified Row has been updated.
Deleted Row has been deleted from table.
Detached It means row is not attached with dataset. Means you have just created the row but not added in dataset by calling Add method yet. If row has been removed from dataset or deleted it’s row status will be detached.
Row Version
A data row object contains multiple value based on the version of row. If we pass version value in data row we can get the data row value for that version.
DataRow objEmpDataRow = objDtEmp.Rows[0];
string objEmpDataRow = objEmpDataRow["EmpID", DataRowVersion.Original].ToString();
Version can be categorized following way.
Current With the help of this you can get the current value of the row.
If row state is Deleted you can not get value for this version.
Default Default row version depends upon Row Status, If Row Status is Added,Modified or Unchanged, the default version value will be equivalent to Current. For Deleted it is equivalent to Original. For Detached it is equivalent to Proposed.
Original This gives you original values of the row. This is not exist if Row State is Added.
Proposed This gives proposed value of the row. This exist Only if Row Status is detached.
Friday, March 25, 2011
Subscribe to:
Post Comments (Atom)
Followers
Link
Labels
Agille
(3)
Angular 2
(96)
Architecture
(7)
ASP .Net
(30)
C#/VB .Net
(161)
Entityframework
(11)
General
(33)
Git
(2)
Hosting
(2)
HTML
(4)
Interview
(12)
Interview-Agile
(1)
Interview-Angular
(25)
Interview-ASP .Net
(3)
Interview-C#
(16)
Interview-JavaScript
(1)
Interview-MVC
(30)
Interview-SQL Server
(4)
Interview-WCF
(2)
Islam
(6)
Java Script
(37)
JQuery
(1)
MVC
(53)
NodeJS
(1)
Puzzles
(1)
React-Native
(3)
Security
(1)
Shayri
(10)
SQL Server
(41)
VC++
(5)
WCF
(21)
Web API
(27)
WPF
(21)
No comments:
Post a Comment