473,791 Members | 3,090 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to sort the rows in dataTable?

JL
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.
Nov 18 '05 #1
2 1819
A nice article on sorting and filtering....

http://authors.aspalliance.com/olson...rSortData.aspx

HTH
--
Regards,

HD

"JL" <jo********@mai l.hotmail.com> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
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.

Nov 18 '05 #2
JL
Hi,

Problem fixed, thanks for your kindly advice.
"Hermit Dave" <he************ @CAPS.AND.DOTS. hotmail.com> ¦b¶l¥ó
news:%2******** ********@TK2MSF TNGP12.phx.gbl ¤¤¼¶¼g...
A nice article on sorting and filtering....

http://authors.aspalliance.com/olson...rSortData.aspx

HTH
--
Regards,

HD

"JL" <jo********@mai l.hotmail.com> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
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.


Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
9292
by: Hardy Wang | last post by:
Hi, I have a DataSet, returned by a stored procudure, which has only on DataTable. At this step there is no sort in DataTable. Is there is a way I can do to sort DataRows in this DataTable (not from select statement of sql query) in memory? Thanks -- WWW: http://hardywang.1accesshost.com ICQ: 3359839
2
3180
by: Fredrik Rodin | last post by:
All, I've been looking around for a solution to my problem for a couple of days now. In short, here's my situation: 1. I'm getting a result from a component back as a datatable and I have no option to sort the different columns during the call to the component.
5
2233
by: Gene Hubert | last post by:
I'm using the DefaultView from the Datasource for a DataGrid to present the data in a particular order. It seems that sorting in this way is an "Active Sort", as is the default sort that is provided by clicking on a column header. By "Active Sort", I mean that editing a value in a sorted column may cause the record to be moved to maintain the sort order. Is there an efficient way to present the data in a given order but not have it be...
18
1769
by: Doug Bell | last post by:
Hi, I have a function that loads Rows from a field in a DataTable into an ArrayList. See below: It also adds a Row (eg "All Areas"). I wanted this new row to be the first record so I added a preceeding space (eg " All Areas") and sorted the ArrayList. I have just found that there are some valid records that have one or more
1
1988
by: Lyners | last post by:
I am trying to figure out the best way to do this (currently I am having a problem sorting). I have a vb.net program that contains 2 datagrids on a form for the end user. When the user is ready to process, behind the scenes, I combine the 2 datagridas into a datatable, sort and do processing for creating a load into another system. My problem is that when I combine the two datagrids into the 1 datatable, I can only sort in a dataview. When...
3
4497
by: gilly3 | last post by:
I have a column in a DataView that contains NaN. When I attempt to Sort on this column, I get: MESSAGE: Index was outside the bounds of the array. SOURCE: System.Data STACKTRACE: at System.Data.Index.Sort(Int32 left, Int32 right) at System.Data.Index.InitRecords() at System.Data.Index..ctor(DataTable table, Int32 indexDesc, DataViewRowState recordStates, IFilter rowFilter)
4
1544
by: G .Net | last post by:
Hi I have a question which I hope you can help with. I am setting the DataSource of a DataGrid to be a DataView. I am sorting the DataView by various fields which include a Date. When I create a new row in the DataGrid and set the date to me within the current sort range, the newly created row "jumps" to its correct position in the grid. This obviously makes sense because it is following the sort rule.
4
1701
by: sklett | last post by:
(I posted this in a databinding NG, but it's a VERY low traffic NG so I thought I would post here as well. I hope no one minds too much, if you do I'm sorry) I have a DGV that is bound to a DataTable that is loaded during application startup. I can sort with all the columns and everything works fine. I have a method that can be invoked from a context menu that will loop through the rows of the bound table and modify a specific cell in...
0
995
by: Bimal Kothari | last post by:
private DataTable SortDataTable(DataTable GetDataTable, string sort) { DataTable _NewDataTable = GetDataTable.Clone(); int rowCount = GetDataTable.Rows.Count; DataRow foundRows = GetDataTable.Select(null, sort); // Sort with Column name for (int i = 0; i < rowCount; i++) { object arr = new object;
3
5008
by: Bimal Kothari | last post by:
private DataTable SortDataTable(DataTable GetDataTable, string sort) { DataTable _NewDataTable = GetDataTable.Clone(); int rowCount = GetDataTable.Rows.Count; DataRow foundRows = GetDataTable.Select(null, sort); // Sort with Column name for (int i = 0; i < rowCount; i++) { object arr = new object;
0
9669
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9515
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9995
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
9029
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...
0
6776
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
5431
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5559
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3718
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2916
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.