By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,600 Members | 1,214 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,600 IT Pros & Developers. It's quick & easy.

sorted table or view

P: n/a
sam
Hello group,
The datagrid is sorted using a dataview. Can I get the
sorted dataview or table from the datagrid or any other way. All I
need to get is the sorted data. Here is my code and what I am trying
to accomplish:
The datagrid is sorted using:

dgWIP.DataSource = dvWIP
dvWIP.Sort = Me.SortColumn & " " & Me.SortOrder
dgWIP.DataBind()
Now, I need to manipulate the sorted data as the order of the rows is
important to me. How do i get the sorted data into a
variable(datatable/view)? I tried doing something like :
dt = dvwip.table
and stepped thru the code but the dt(table) has the rows in the
original order. Any help would be great!!

Thanks,
Sam.
Jul 21 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
The view is the key,

you have to step through the rows in the view, not the table.

--
Patrik L÷wendahl [C# MVP]
www.cshrp.net - "Elegant code by witty programmers"

"sam" <sr*****@mailcity.com> wrote in message
news:5c**************************@posting.google.c om...
Hello group,
The datagrid is sorted using a dataview. Can I get the
sorted dataview or table from the datagrid or any other way. All I
need to get is the sorted data. Here is my code and what I am trying
to accomplish:
The datagrid is sorted using:

dgWIP.DataSource = dvWIP
dvWIP.Sort = Me.SortColumn & " " & Me.SortOrder
dgWIP.DataBind()
Now, I need to manipulate the sorted data as the order of the rows is
important to me. How do i get the sorted data into a
variable(datatable/view)? I tried doing something like :
dt = dvwip.table
and stepped thru the code but the dt(table) has the rows in the
original order. Any help would be great!!

Thanks,
Sam.

Jul 21 '05 #2

P: n/a
Hi Sam,

I was telling you how to do that, however because you had written a lot
more, and therefore had the idea that what you was asking was useless to
gave a direct answer for and asked you which of the two alternatives you
choose.

If you think than it is the way in a newsgroup to open a new thread, and not
giving answers back, feel free to do that.

Cor
Jul 21 '05 #3

P: n/a
sam
Hello Group,
I believe, i need to clarify some of my concepts.. When I
assign a table to a dataview, the order of data contained in the
dataview is the same as the data in the dataview after the sort(when I
step thru the rows). But the datagrid(dgwip) displays the data in a
sorted order. Consider the code below"

dvWIP = New DataView(dsWIP1.Tables(1) -- (1)
dgWIP.DataSource = dvWIP
dvWIP.Sort = Me.SortColumn & " " & Me.SortOrder
dgWIP.DataBind() -- (2)

I dont see any difference in the dataview when stepped thru the rows.
Is that true?

Thanks,
Sam.


sr*****@mailcity.com (sam) wrote in message news:<5c**************************@posting.google. com>...
Hello group,
The datagrid is sorted using a dataview. Can I get the
sorted dataview or table from the datagrid or any other way. All I
need to get is the sorted data. Here is my code and what I am trying
to accomplish:
The datagrid is sorted using:

dgWIP.DataSource = dvWIP
dvWIP.Sort = Me.SortColumn & " " & Me.SortOrder
dgWIP.DataBind()
Now, I need to manipulate the sorted data as the order of the rows is
important to me. How do i get the sorted data into a
variable(datatable/view)? I tried doing something like :
dt = dvwip.table
and stepped thru the code but the dt(table) has the rows in the
original order. Any help would be great!!

Thanks,
Sam.

Jul 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.