Re: sorted table or view

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: sam (sri_san_at_mailcity.com)
Date: 09/15/04


Date: 15 Sep 2004 08:27:08 -0700

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.

sri_san@mailcity.com (sam) wrote in message news:<5ca7db4a.0409090552.58927b3e@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.



Relevant Pages

  • Re: sorted table or view
    ... dataview is the same as the data in the dataview after the sort(when I ... > sorted dataview or table from the datagrid or any other way. ... > need to get is the sorted data. ... > Sam. ...
    (microsoft.public.dotnet.framework.aspnet.datagridcontrol)
  • Re: Datatable interer Original-Index beim Sortieren
    ... Du brauchst beim DataGrid keine Datenbank. ... Grid holt sich die Daten aus einem Puffer. ... DataView usw. sein. ... legt über die eigentliche DataSource eine ArrayList, ...
    (microsoft.public.de.german.entwickler.dotnet.datenbank)
  • Re: DataGrid Row Searching
    ... This is what I ended up with - you pass in a dataview and the key value you ... that index is the same as the row in a DataGrid. ... How do I select a cell in a datagrid based on its primary key/ID, ... I have a datagrid bound to the dataset, with datamember = Employee ...
    (microsoft.public.dotnet.framework.adonet)
  • RE: ArgumentOutOfRangeException with Datagrid in PocketPC.is it a framework bug ?
    ... Changing filter/sort on a DataView which is already bound to a control is ... Using VB.NET i display data of a dataset using a datagrid. ... i solved this problem too: before deleting the line i set to ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Extracting subsets of a DataSet
    ... Try it first with that sort on the model column commented out and see what is displayed in your datagrid. ... Regarding the application I am making, it is a Web Form, not a Windows Form. ... I have abandon the DataView idea because what I have read about DataView does not seem to be what I want. ... My goal is to display only, not modify, a subset of those rows based on user input. ...
    (microsoft.public.dotnet.languages.vb)