473,396 Members | 2,016 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

how to keep the rows ordering of datatable unchanged?

I have a datatable with the ordering of its DataClassIndex column before editting:

DataclassIndex 0 1 2 3 4

When I start modifying some other cells in this datatable, the ordering of DataClassIndex column changes to something like this

DataclassIndex 3 4 2 1 0

How can I modify a datatable content without altering the original order of the datatable.
Jul 6 '10 #1
3 2180
Frinavale
9,735 Expert Mod 8TB
Your question doesn't make sense to me.
A DataTable is just a table that contains a bunch of data in it.

What do you mean when you say the DataClassIndex changes?

Does the underlying data in the DataTable change (if so, why does it change? This doesn't happen without you doing something to it)

Or are you talking about a GridView displaying the DataTable data...and how the rows could possibly change if the user sorts the GridView??

-Frinny
Jul 13 '10 #2
@Frinavale
When I tried to modify some data in the datatable, the ordering of rows get changed. DataClassIndex is the name of the column in the datatable which contains the index of the rows of the datatable. Again, changing the data for some cells in the datatable alters the ordering of rows in the datatable which is not what I want. Thanks.
Jul 13 '10 #3
Frinavale
9,735 Expert Mod 8TB
I've never heard of this.
Either you have some "sorting" going on in the control that is displaying the DataTable or you have some logic/code that is modifying the order of the rows. I can't guess at what you are doing that may be causing this problem...
Jul 14 '10 #4

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

Similar topics

3
by: MrNobody | last post by:
I've read that the expression property for DataColumns is used to "Sets or retrieves the expresssion used to filter rows, calculate the values in a column, or create an aggregate column.". I...
5
by: jurson | last post by:
Hello, I remove row from DataTable. It works ok, the row is removed from collection. It should be marked as 'detached'. Am I right? Then I try to retrieve 'detached' rows using the code shown...
2
by: shankar | last post by:
Hi all, This is the way to append the rows from one datatable into another with the same schema. Here Temp and Temp1 are the datatables For Each rows As DataRow In tempTable.Rows Temp1...
2
by: JL | last post by:
Hi all, I want to sort the rows in dataTable and the order of rows is permanent change, is this possible in dataTable? Thanks a lot.
5
by: Brett Romero | last post by:
I keep getting this error with the following code: This row already belongs to another table DataSet ds = new DataSet(); DataTable dtPersonID = new DataTable();...
3
by: Niyazi | last post by:
Hi all, I have a dataTable that contains nearly 38400 rows. In the dataTable consist of 3 column. column 1 Name: MUHNO column 2 Name: HESNO Column 3 Name: BALANCE Let me give you some...
1
by: srinivas | last post by:
HI, I have 4 text boxes and one button in my page. When ever I fill the text boxes and click the button the data should be add to a datagrid with out inserting a record in database. For this I...
2
by: qialexandrew | last post by:
Hi all, I used DataTable to retrieve information from MySQL database. I expect to have 4 rows returned in the DataTable(I tried the same query in MySql Query Browser), however I got 6. The code...
4
by: sudhaMurugesan | last post by:
Hi all, I am importing data from excel sheet. i get the data in a datatable. when there are empty rows in excel i am getting empty rows in datatable also. how to remove empty rows? help me...
1
by: ArunDhaJ | last post by:
Hi, Can we write custom function to filter rows from DataTable Select method? Actually my need is to format the row value from (901) 789 1234<BR>(901) 789 1235<BR>(901) 789 1221 to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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...

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.