473,396 Members | 2,089 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.

pre-sort, post-sort

Hi again,
I've asked this question before, but I think I'd better rephrase. I've just
clicked a column header in my DataTable/DataGrid and the column is sorted.
Pre-sort, I got the file number from the File column (xFile - which doesn't
change) and the row number (row) of the highlighted row. Now, post-sort, I'm
trying to find the new row that this xFile is in. After I tell it sort, I
tell it to come here:

DataView dv = new DataView(tCat, "", "File", DataViewRowState.CurrentRows);
row = dv.Find(xFile);
if (row <= dv.Table.Rows.Count && row > -1){dg.Select(newPosition);}

Unfortunately, it doesn't find the new position of xFile, but does select
some other row. I'm not sure what to do (I've tried so many other ways,
including the currency mananger thing, but nothing works).
Help!!!!
Thanks again,
Mel
Nov 17 '05 #1
1 1133
Oops, this should have been
if (row <= dv.Table.Rows.Count && row > -1){dg.Select(row);}
for the last line (not newPosition).

"melanieab" wrote:
Hi again,
I've asked this question before, but I think I'd better rephrase. I've just
clicked a column header in my DataTable/DataGrid and the column is sorted.
Pre-sort, I got the file number from the File column (xFile - which doesn't
change) and the row number (row) of the highlighted row. Now, post-sort, I'm
trying to find the new row that this xFile is in. After I tell it sort, I
tell it to come here:

DataView dv = new DataView(tCat, "", "File", DataViewRowState.CurrentRows);
row = dv.Find(xFile);
if (row <= dv.Table.Rows.Count && row > -1){dg.Select(newPosition);}

Unfortunately, it doesn't find the new position of xFile, but does select
some other row. I'm not sure what to do (I've tried so many other ways,
including the currency mananger thing, but nothing works).
Help!!!!
Thanks again,
Mel

Nov 17 '05 #2

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

Similar topics

2
by: GriffithsJ | last post by:
Hi I have been given some text that needs to be displayed on a web page. The text is pre-formatted (includes things like lists etc) and displays okay if I wrap it using the <pre/> tag. ...
21
by: Headless | last post by:
I've marked up song lyrics with the <pre> tag because it seems the most appropriate type of markup for the type of data. This results in inefficient use of horizontal space due to UA's default...
3
Pre
by: Neal | last post by:
A few questions about pre... When presenting preformatted text using the white-space: pre; property/value, Opera renders long lines at small viewport widths as exiting the borders of the...
7
by: Alan Illeman | last post by:
How do I set several different properties for PRE in a CSS stylesheet, rather than resorting to this: <BODY> <PRE STYLE="font-family:monospace; font-size:0.95em; width:40%; border:red 2px...
2
by: Buck Turgidson | last post by:
I want to have a css with 2 PRE styles, one bold with large font, and another non-bold and smaller font. I am new to CSS (and not exactly an expert in HTML, for that matter). Is there a way to...
5
by: Porthos | last post by:
I'm authoring an XML document and using the <pre> html tag for the portions that are not dynamically generated. The <pre> text is displaying in a smaller font size (and I believe different font)...
8
by: Jarno Suni not | last post by:
It seems to be invalid in HTML 4.01, but valid in XHTML 1.0. Why is there the difference? Can that pose a problem when such a XHTML document is served as text/html?
9
by: Eric Lindsay | last post by:
I can't figure how to best display little snippets of shell script using <pre>. I just got around to organising to bulk validate some of my web pages, and one of the problems occurs with Bash...
14
by: Schraalhans Keukenmeester | last post by:
I am building a default sheet for my linux-related pages. Since many linux users still rely on/prefer viewing textmode and unstyled content I try to stick to the correct html tags to pertain good...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...
0
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,...

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.