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
2
votes
1 answer

LINQ Select Modified Version From Datatable

Can you please provide me with a sample syntax for it? Something like this? var qry = (ds.table.Select(s => s.col, string.Empty, DataViewRowState.ModifiedCurrent)); thanks
user1215811
  • 55
  • 1
  • 5
2
votes
1 answer

Did I use RowFilter on DataView with Threading correctly?

EDIT: I am using VS2008, .NET 3.5 I have a DataTable, which is populated in a DataView and passed into a CollectionView. DataTable newLeadTable = new DataTable(); myConnection.Open(); dbAdpater.Fill(newLeadTable); this.LeadDataView = new…
King Chan
  • 4,212
  • 10
  • 46
  • 78
2
votes
1 answer

How can I display text with carriage returns in a GridView in ASP.Net

I'm trying to display records within my GridView and a few of the cells contain text with carriage returns. However when this text is displayed the carriage returns are gone. Is there an easy way to display carriage returns in a GridView Cell? I've…
user1131661
  • 229
  • 3
  • 8
  • 19
2
votes
2 answers

Extjs DataView to display tooltips

I am using ExtJS DataView for my image gallery. This is my way for item tooltip. It's in tpl. new Ext.XTemplate( '', '
', '
jeewiya
  • 571
  • 11
  • 24
2
votes
4 answers

Aggregate functions in ADO.NET with GROUP BY functionality

This is a more direct question stemming from an earlier more general question i had earlier now that I've spend more time looking into ADO.NET I want to take an ADO.NET DataTable and perform the equivalent of a SQL SELECT query with aggregate…
Eric Anastas
  • 21,675
  • 38
  • 142
  • 236
2
votes
1 answer

DataView component in SPD attaches needless strings to field values

In SharePoint Designer I use some lists as sources and then link them together with an operation GetListItems (I fetch items from multiple lists on different site collections for rollup/aggregation): alt text…
Janis Veinbergs
  • 6,907
  • 5
  • 48
  • 78
2
votes
1 answer

Can a jQuery script be added to a dataviewjs snippet to change progress bar appearance?

I am running a dataviewjs snippet in a markdown file, specifically Obsidian, but I am not happy with the progess bar appearance, which uses green for 'barely started or bad' and red for 'finished or good'. I'd like to reverse that. I found a jQuery…
2
votes
2 answers

Joined Linq query to DataTable and result to DataView

I have two DataTables , Items and its Groups. I have a linq query to get item Name and its Group Name by joining the 2 tables. EnumerableRowCollection dvquery = (from item in Items.AsEnumerable() …
Hakim
  • 75
  • 1
  • 11
2
votes
0 answers

ML.NET loading data from enumerable returns empty IDataView

I am trying to put data from a database into a list and then loading it into an IDataView, but the IDataView is empty every time. Here is the problem code: (IDataView training, IDataView test) LoadData(MLContext mlContext) { var trainData = new…
2
votes
2 answers

Populate a DataGridView with a DataView

I would like to fill in my DataGridView with a DataView that we can assume already contains data. I have been searching for a way to do this but all the solutions involve other data structures than a DataView or involve using other libraries that I…
Boumbles
  • 2,473
  • 3
  • 24
  • 42
2
votes
5 answers

Retrieving rows in DataView by its index

I have a DataView, which has been sorted in some order. How can I retrieve the values using an index. Something like this: if(dv.rows[0]["name"]=="xxx") { --- do something --- } else --- something else ---
Huzefa
  • 127
  • 1
  • 2
  • 9
2
votes
1 answer

SQL statement not being correctly populated from DetailsView (ASPX/C#)

I've got the following code in an ASPX page:
David Perry
  • 1,324
  • 5
  • 14
  • 31
2
votes
2 answers

Using sepirated Dataviews with one Datatable for filling two combobox

I have one Datatable and I have two Dataviews, I wanted to use each Dataview to fill a Combobox as next code: Dim xDv_Parents As DataView = MyVar_Dt_AllAccounts.DefaultView xDv_Parents.RowFilter = "AccType='Main'" Call…
Hamada
  • 517
  • 3
  • 13
2
votes
1 answer

Moving Rows up and down in a sorted DataTable set as the DataSource of a DataGridView does not update the View

I've looked online and I've seen a lot of different posts of similar stuff. My code moves the rows correctly. This is what happens: I press either the UP or Down Buttons, the selected rows moves accordingly. If I click on the Row that I just moved…
Edgar
  • 543
  • 10
  • 20
2
votes
2 answers

Issue in ExtJS 6 dataview while rendering on Windows 10 in IE11 (non Edge mode)

Background: We have used ExtJS 6 to develop our application. In one of the view we have used dataview inside Tab panel. Scrollable is enabled for this dataview. We have specified X-UA-Compatible mode to Edge. Working condition: Windows 7 + IE11…
Amol
  • 21
  • 2