Distinct DefaultView.RowFilter

Distinct DefaultView.RowFilter

Post by ken waug » Thu, 05 Dec 2002 00:56:23



Is there a way to filter the dataset to contain only distinct values?

for example:

ds.Tables("myTable").DefaultView.RowFilter() = "fname distinct"  - I know
this doesn't work but I was wondering if it is possible.

Thanks

 
 
 

Distinct DefaultView.RowFilter

Post by <colin> » Thu, 05 Dec 2002 03:07:51


No,

We have asked for it to be included in future versions


Quote:> Is there a way to filter the dataset to contain only distinct values?

> for example:

> ds.Tables("myTable").DefaultView.RowFilter() = "fname distinct"  - I know
> this doesn't work but I was wondering if it is possible.

> Thanks


 
 
 

1. problem with the DataSet DefaultView and RowFilter

Hi guys,

I want to create two dataviews from the defaultview of a dataset and bind
them to two datagrid control. The problem is the first dataview rowfilter
always overwrited by the second one. Why?

Here is my code:

            DataGrid1.DataSource = Nothing
            DataGrid2.DataSource = Nothing
            dsService = New DataSet()
            Dim dsEnabledService As New DataView()
            Dim dsDisabledService As New DataView()
            Try
                'create a new dataset from a string stream
                Dim strTemp = .....
                Dim stringReader As New StringReader(strTemp)
                dsService.ReadXml(stringReader, XmlReadMode.ReadSchema)
                dsService.AcceptChanges()
                'create the first dataview
                dsEnabledService = dsService.Tables(0).DefaultView
                dsEnabledService.RowFilter = "stopped = 0"
                'create the second dataview
                dsDisabledService = dsService.Tables(0).DefaultView
                dsDisabledService.RowFilter = "stopped = 1"
            Catch ex As Exception
                MessageBox.Show(ex.Message)
            End Try
            'bind the two dataviews to datagrid
            DataGrid1.DataSource = dsEnabledService
            DataGrid2.DataSource = dsDisabledService

Thanks,
Bruce Lee

2. map, set and other containers in exported class

3. Urgent:[Iterating Rows after Applying RowFilter in DefaultView]

4. pinnacle apex 4.2

5. DataTable.Select / DefaultView.RowFilter

6. My Video is upside down.

7. defaultview.rowfilter question

8. Tandy - Victor

9. Urgent:[Iterating Rows after Applying RowFilter in DefaultView]

10. Simulating SELECT DISTINCT in a RowFilter - how to?

11. defaultview.find erratic behavior

12. defaultview find behavior

13. DefaultView problem