dataview

DataView component in SPD attaches needless strings to field values.

Hello. 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): Now something is fine as I managed to get the result: But the strings that are attached to field result (6;#, 2;#) is... distu...

web part visible to admin

Hi, I have added a DataView Web part to a SharePoint. After making some customization The web part renders fine when I log in as an Admin, but with a reader account I don't none of the changes I've made to that web part. Cheers ...

Allowing a user to create a custom query of a table

I am writing a program that generates a single large table of information. The table is made up of two types of columns, columns that contain quantities, and columns that contain properties. Quantities are numeric values that can be summed, properties are qualitative values that attribute the quantity values. If the data is in a table i...

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 functions (such as SUM) on some columns, and GROUP BY set for the remaining columns. I then wan...

How to remove column in DataSet and distinct rows to find only group names?

I have DataSet which has 3 columns. Name - insurance comp. name - treatmentDate Ali Boz SGK 12.04.09 Ali Boz SGK 14.04.09 Ali Boz SGK 16.04.09 Ali Boz SGK 18.04.09 Veli Aş AKBANK ...

How do I check for blank in DataView.RowFilter

Assume I have a column called A and I want to check if A is null or blank, is the proper way to check for this using the DataView's RowFilter: DataTable dt = GetData(); DataView dv = new DataView(dt); dv.RowFilter = "A IS NOT NULL OR A IS NOT ''"; The above doesn't seem to work though. ...

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: <body xmlns:sys="javascript:Sys" xmlns:dataview="javascript:Sys.UI.DataView" sys:activate="*"> DataView tag: <ul sys:attach="dataview" dataview:data="{{ ListOfPeople }}" class="sys-template"> ...

Does DataView.ToTable() keep a descending sort order?

Hi everyone! I have a problem with sorting a DataTable. I'm using DataView.Sort and then DataView.ToTable() to get the sorted table. Then I go through the table row by row and create nodes in a TreeView which is shown in a desktop application. My problem is that I can sort the data in ascending order and it is shown in the TreeView in...

Highlight search text in DataView

I have a DataView and I need to search a string inside the view. I only want the search string to get highlighted and all those rows where the search string does not exist to still show but they would obviously not be highlighted. Is there any built in functionailty in DataView or DataGridView to achieve this, or do I have to traverse ea...

C# DataView Date Range with LIKE Operator?!?

I have an XML file: <SMS> <Number>+447761692278</Number> <DateTime>2009-07-27T15:20:32</DateTime> <Message>Yes</Message> <FollowedUpBy>Unassigned</FollowedUpBy> <Outcome></Outcome> <Quantity>0</Quantity> <Points>0</Points> </SMS> <SMS> <Number>+447706583066</Number> <DateTime>2009-07-27T15:19:16</...

Create ADO.NET DataView showing only selected Columns

In C# & .NET, can one create a DataView that includes only a proper subset of the DataColumns of a given DataTable? In terms of relational algebra, one assigns a RowFilter in order to perform a "selection" operation (). How would one perform a "projection" operation ()? ...

How to take the first ten records from a DataView?

I have a System.Data.DataView object but only want the first ten records, sorted by a column called "responseTime". DataView dv = Factory.GetDataView("something"); dv.Sort = "responseTime desc"; // now what? ...

Injection Attacks against .NET DataView RowFilter

So I'm writing a handler that filters a cached DataTable based on the AppRelativeCurrentExecutionFilePath using the DataView RowFilter property. What's the best way to encode the input to prevent an injection attack? Is the following sufficient? Is there a better/more-elegant way? dataView.RowFilter = String.Format("Name LIKE '{0}%'"...

.Net DataView and DataTable Binding

I have a simple Windows Forms application which binds a DataView to a ListBox. This DataView uses Linq to sort my DataTable by a specific column descending. My ListBox is then bound to the DataView. I then have a simple form to add data to the DataTable. When I add a DataRow to the DataTable it displays in the ListBox. I'm curious as to...

Sorting a dataset with a dataview

This code correctly fetches data, and displays it; however, the sort is completely ignroed. DataTable dt = f.Execute().Tables[0]; dt.DefaultView.Sort = summaryColumn; rptInner.DataSource = dt.DefaultView; rptInner.DataBind(); Is there something I can do to force the view to sort itself? (f.Execute() returns a dataset with at table a...

ASP.NET Ajax 4.0 - Get element out of dataview

Hi, I'm playing around with the Ajax 4 preview & am stuck on something... I've got the following dataview: <ul id="paymentOptionListView" class="list sys-template"> <li> <input id="Radio{{ PaymentOptionId }}" type="radio" name="radPaymentOption" value="{{ PaymentOptionId }}" /> <span class="value">{{ PaymentOption...

How to sort dataset.table[0] then get the top 10 ?

I'm adding an auto increment column (called "rowNum") to my table and it's working good, after that I use this code to sort datatable rows : DataView dv = MyDataSet.Tables[0].DefaultView; dv.Sort = "columnName DESC"; where columnName is one of my columns (not the auto increment one). Now,The problem is: when I want to get the top 10 ...

C# Custom DataView

Hi, I have some requirement to implement a very non-standard sort in my data grid, the grid is currently bound to a DataView with the Original rows data row filter set, the data comes in realtime so i do an accept changes on a timer every second to show any changes made on the underlying data table. The grid is read-only, it's purely d...

Looping through rows in a DataView

The DataView object doesn't have a Rows property like DataTable. How do I loop through the rows of a DataView? ...

Odd paging problem with DataGrid and sorting

I have a data table that is being filled by a stored procedure. I need to filter down the results some, so I get a data view from the default view and apply a row filter to it. I then bind this to my DataGrid. All is fine at this point. I see two pages (17 records with 10 per page). If i apply a sort to the grid though, it now shows...