473,395 Members | 1,441 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,395 software developers and data experts.

Data grid row after sort

Das
Hi,

With the data grid I have set the allow sort to true. I aslo know with
hittest which column was last sorted.

Even thought I sort the dataview with that field but. But then How can I
get the currently selected row. there is one column in datagird "id". I want
to get that Id to show the further details......

Current Row index works perfectly if no sorting on the headers is applied I
want to retrive the id even after sorting......
Thanks in advance.....
Regards,

das
Nov 17 '05 #1
2 1748
Das,

Why not get the value of the id field before the sort is applied, then
set the current row to that field when the sort is complete?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Das" <Da*@discussions.microsoft.com> wrote in message
news:B5**********************************@microsof t.com...
Hi,

With the data grid I have set the allow sort to true. I aslo know with
hittest which column was last sorted.

Even thought I sort the dataview with that field but. But then How can I
get the currently selected row. there is one column in datagird "id". I
want
to get that Id to show the further details......

Current Row index works perfectly if no sorting on the headers is applied
I
want to retrive the id even after sorting......
Thanks in advance.....
Regards,

das

Nov 17 '05 #2
Das
Thanks for reply,
User can click on any row at any time. I want to access the fields in the
currently selected row......

I think that it shouldn't be that complicated I must be missing some
thing....
das
"Nicholas Paldino [.NET/C# MVP]" wrote:
Das,

Why not get the value of the id field before the sort is applied, then
set the current row to that field when the sort is complete?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Das" <Da*@discussions.microsoft.com> wrote in message
news:B5**********************************@microsof t.com...
Hi,

With the data grid I have set the allow sort to true. I aslo know with
hittest which column was last sorted.

Even thought I sort the dataview with that field but. But then How can I
get the currently selected row. there is one column in datagird "id". I
want
to get that Id to show the further details......

Current Row index works perfectly if no sorting on the headers is applied
I
want to retrive the id even after sorting......
Thanks in advance.....
Regards,

das


Nov 17 '05 #3

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

Similar topics

5
by: pmud | last post by:
Hi, I need to display columns in a data grid based on 7 different queries. Now I have 32 questions: 1. Is it possble to have 1 single data adapter with 7 queries & 1 data set or do I need to...
12
by: pmud | last post by:
Hi, I am using teh following code for sorting the data grid but it doesnt work. I have set the auto generate columns to false. & set the sort expression for each field as the anme of that...
1
by: Da-Breegster | last post by:
Hi. I'm attempting to write a roguelike (think nethack, crawl, angband, tome, adom, and yes, I suppose even rogue) in Perl and I've ran into a problem regarding the data structure for the map and...
1
by: Matthew Louden | last post by:
I am trying to implement the sort event in data grid. I set the data grid's AllowSorting property = True. I implement the following code that should be the event will fire when the user click any...
1
by: Linda | last post by:
Hi, I'm new to asp.net and tryign to learn how to work with data grids. I'm retrieving data from a stored procedure and putting it in a data grid. I then want to be able to sort the data when...
6
by: Hutty | last post by:
I've looked around and have yet to find anything that would answer my question regarding formating a column in a datagrid. My grid looks like this as far as data" AMHQCON|51300.01|-3147 The...
5
by: tshad | last post by:
Is there a way to carry data that I have already read from the datagrid from page to page? I am looking at my Datagrid that I page through and when the user says get the next page, I have to go...
11
by: Thomas A | last post by:
Hi, I fill a datgrid with data from a xml document, it works fine But.... Now I will to filter the data to the grid so only the data shows from the criteria that I set. My code now is very...
5
by: Brian P. Hammer | last post by:
I have data from multiple SQL tables, some of the tables will only have one row, while others multiple rows. I load a bunch of data from the various tables and add them to a third party grid. With...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: 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:
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
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.