Questions tagged [dataview]

A dataview is a .net class which represents a databindable, customized view of a DataTable for sorting, filtering, searching, editing, and navigation. The DataView does not store data, but instead represents a connected view of its corresponding DataTable. Changes to the DataView’s data will affect the DataTable. Changes to the DataTable’s data will affect all DataViews associated with it.

A DataView enables you to create different views of the data stored in a DataTable, a capability that is often used in data-binding applications. Using a DataView, you can expose the data in a table with different sort orders, and you can filter the data by row state or based on a filter expression.

A DataView provides a dynamic view of data in the underlying DataTable: the content, ordering, and membership reflect changes as they occur. This behavior differs from the Select method of the DataTable, which returns a DataRow array from a table based on a particular filter and/or sort order: thiscontent reflects changes to the underlying table, but its membership and ordering remain static. The dynamic capabilities of the DataView make it ideal for data-binding applications.

A DataView provides you with a dynamic view of a single set of data, much like a database view, to which you can apply different sorting and filtering criteria. Unlike a database view, however, a DataView cannot be treated as a table and cannot provide a view of joined tables. You also cannot exclude columns that exist in the source table, nor can you append columns, such as computational columns, that do not exist in the source table.

References

723 questions
5
votes
2 answers

Select top N rows AFTER sorting from Dataview in c#

I have a DataTable with 10 rows say one of the columns numbered 1 to 10 randomly. I want to sort them. usually, I do this: DataView Dv = new DataView(dtPost, "", "views desc", DataViewRowState.Unchanged); repeater.DataSource =…
iamserious
  • 5,385
  • 12
  • 41
  • 60
5
votes
3 answers

DataTable sorting with Datacolumn Name with comma

I have data table showing statistics of different cities for different periods. It has following columns names Period | city1,state | city2,state | city3,state Jan 15 25 20 Feb 5 26 29 Mar …
Haseeb Asif
  • 1,766
  • 2
  • 23
  • 41
5
votes
1 answer

Updating a single cell (not the entire row) in slickgrid with DataView

I have a slickgrid (using a DataView) that I'm using to display rapidly changing values. As far as I know, when a value changes in the underlying model, the only choice I have is to update the entire row: dataView.updateItem(rowId,…
ricklane
  • 173
  • 1
  • 11
4
votes
1 answer

How can we make the DataView Control respond to javascript events?

If I had an ASP.NET 4.0 DataView control that looked like below, how can I control javaScript events on the client side? Body tag: DataView…
Rap
  • 6,851
  • 3
  • 50
  • 88
4
votes
2 answers

Sencha Touch DataView not showing items from Store

I'm using Sencha touch 2. I have store that load from existing js object: Ext.define('majestic.store.Dataset', { extend : 'Ext.data.Store', requires : [ 'majestic.model.Dataset', 'majestic.util.config.ConfigurationManager' …
Pavel Krymets
  • 6,253
  • 1
  • 22
  • 35
4
votes
2 answers

How to Naturally Sort a DataView with something like IComparable

My DataView is acting funny and it is sorting things alphabetically and I need it to sort things numerically. I have looked all across the web for this one and found many ideas on how to sort it with ICompare, but nothing really solid. So my…
SpoiledTechie.com
  • 10,515
  • 23
  • 77
  • 100
4
votes
1 answer

How to get data after DataView filtering?

I apply a filter to Dataview and after that I need to get the filtered data. before filtering I did: dvUnloadOpenAccounts.RowFilter = "uso_id = '30640'"; foreach (DataRow row in dvUnloadOpenAccounts.Table.Rows) { HSSFRow dataRow =…
DmitryB
  • 1,149
  • 5
  • 20
  • 34
4
votes
5 answers

SELECT DISTINCT in DataView's RowFilter

I'm trying to narrow down the rows that are in my DataView based on a relation with another table, and the RowFilter I'm using is as follows; dv = new DataView(myDS.myTable, "id IN (SELECT DISTINCT parentID FROM myOtherTable)", …
Chris McAtackney
  • 5,192
  • 8
  • 45
  • 69
4
votes
3 answers

DateTime filtering in DataTable.DefaultView.RowFilter

I have tried to filter the DateTime column from a DataTable using RowFilter and the column contains the Date with the Time. I have tried like below, dataView.RowFilter = "[Date] = #6/26/2011 2:53:24 PM#"; But the filter is not working. Could…
Amal
  • 141
  • 1
  • 10
4
votes
1 answer

Filter an integer using Like in BindingSoure.Filter or DataView.RowFilter

I've Trying to filter a DataView which have multiple columns where some is numerical values. Everything works perfectly when typing in a string but once a numerical value gets entered (like checking for courier #) it filters to nothing. How My Data…
sgtBlueBird
  • 157
  • 3
  • 12
4
votes
1 answer

Why is Javascript TypeDArray not working?

I have 4 bytes ArrayBuffer and I assigned a number at the index 0 using dataview. When I try to get the value using dataview that gives result correctly but it does not give correct result when I try to get value using typed array. Can anyone help…
4
votes
2 answers

Add One DataView to Another in C#

I need to add two DataViews together to have one Dataview that can then be bound to a Repeater. I am plugging into someone else's API so I can't change the way the data is retreived at the SQL Level. So essentially I want to do this: DataView…
Seth Duncan
  • 1,255
  • 2
  • 13
  • 31
4
votes
2 answers

Data browser for R similar to Stata

I'm new to R with a background using Stata. I am wondering if there is a real-time browser to see how data changes after executing codes, much like the Data Browser in Stata. I've consulted previous threads (e.g.…
kquach
  • 161
  • 1
  • 10
4
votes
1 answer

Convert Sorted DataView to Typed DataTable

i have a strong typed DataTable named Account wich i sorted on Account.FullName: DataView dvAccount = new DataView(dtAccount) dvAccount.Sort = "FullName desc"; The fullname is a generated field from my DataSet after my query, based on first name,…
Jeroen
  • 343
  • 1
  • 2
  • 12
4
votes
3 answers

What SQL query or view will show "dynamic columns"

I have a table of data, and I allow people to add meta data to that table. I give them an interface that allows them to treat it as though they're adding extra columns to the table their data is stored in, but I'm actually storing the data in…
Adam Davis
  • 91,931
  • 60
  • 264
  • 330
1 2
3
48 49