I have a two-column ListView linked to a Datapager. The ListView lists all files of a particular type in a particular directory, so the data source is an ArrayList of type FileInfo. Consequently, I had to create a Comparer class to use in the ArrayList.Sort method.
FileInfoComparer.vb:
Imports System.IO
Friend Class FileInfoDateCompar...
Hi All,
I am trying to get the DataView from a linq query expression which is querying a typed dataset. The result lands in a type of System.linq.IOrderedEnumerable. But i'm not able to convert this type to a Dataview although a few examples on the internet say that AsDataView function shoudl work but could you please throw some light o...
I am using C# and .NET 3.5 and have a GridView that I am setting the dataSource programatically in the code-behind page. I have data in a DataTable and then depending on a column value (isValid boolean) of each Row, I create a new row using DataRowView.AddNew() method into 1 of 2 DataViews - dvValid or dvInvalid. I am NOT creating a new ...
How do I delete a selected ListViewItem from a WPF ListView when the ItemsSource is set to a DataView? I can get the ListViewItem that was selected and then how do remove the actual row in the DataView?
DataView dv = (DataView)myListView.ItemsSource;
ListViewItem lvi = (ListViewItem)myListView.ItemContainerGenerator.ContainerFromItem(m...
Given a DataGridView that has a BindingSource set like this:
On a winform, we add a BindingSource object using the designer, called myBindingScource.
Then on the Form.Designer.cs we add this to the InitializeComponents()
myBindingSource.DataSource = typeof(MyLinq.Person); //Mylinq is the autogenerated Linq Model/Diagram
Later, in the...
hello im using asp.net with vb and sql server 2005.
i have DataSet with 3 tables in it and i want to asign all 3 tables into one DataView
i know its possible to assign each table seperatly by doing this:
Dim dv as New DataView(ds.Tables(i)).DefaultView
but i need all the tables in the dataset and not only the i based index table
i ...
I have a performance bottleneck on a DataView.Sort. The code is below.
/// <summary>
/// Filters the data table and returns a new data table with only the filtered rows.
/// </summary>
/// <param name="dtInput">The dt input.</param>
/// <param name="filterExpression">The filter expression.</param>
/// <returns><...
I'm using DataView.RowFilter to filter the DataView and I'd like to compare rounded double values rather than the full double values.
E.g., the values in the Value column are doubles with lots of precision, whereas the values I'm comparing against are only 2 decimal places.
dataView.RowFilter = "Value IN (1.76, 1.92, 2.44)"
does not w...
We have a production SharePoint site that uses a custom database quite a bit. We have a dev site on a separate box where we develop all of our things then move them over to a live site when they are ready for our customers.
We have many pages that use data views to show information from the database. Most of the actual programmability...
I'm trying to create a bar chart using dataview formated using xsl. The list to chart contains data about number of hours spend on certain project. The project column is of type lookup, which points to a list on the other subsite (simpler: cross site lookup column). The fist data source that I connected to dataview points to the first li...
I have a fairly complex WinForms app that uses data binding to tie strongly typed DataTables to controls (not sure if this fact matters here). An exception gets raised when a change to a column triggers logic that updates another column on that same row (or at least this is my theory).
An example: a Customer record is bound to a Comb...
Hey,
Is there a elegant way, to bind predefined dataGridView columns with results from sql statement?
Example:
dataGridView1.Columns.Add("EID", "ID");
dataGridView1.Columns.Add("FName", "FirstName");
some sql like SELECT t.FirstName as FName, t.EmpID as EID FROM table t ...
and then I call dataGridView1.DataSource = someDataSet.Tab...
Hello,
I have a dataview with around 2000 rows. At page load I want to bind the dataview to an object datagrid :
dataGrid.DataSource = dv;
dataGrid.DataBind();
However the time response is very high (a couple of minutes). What can I do to make it faster ? Or at least can I not freeeze the client ?
...
I have recently been tasked with upgrading an application from .net 1.1 to 3.5 and came across a RowFilter on a DataView that had a different behavior between the two versions.
Here is my code block in 1.1 that works in 1.1 but not 3.5. I get the following error trying to run this in 3.5 "Cannot perform '=' operation on System.String a...
Is there a way to use a parameterized filter on a DataView?
I want to filter rows in a DataView based on a users' search criteria. When doing SQL lookups I can use parameters which help resolve issues with both strange characters and protects against SQL injection. While weird things from a user won’t return or harm data with my view,...
Hi all,
I would like to display tree different lists in one view in sharepoint.
1) Project_list: here I have all projects
2) Project_list_Costs: here I have all costs for each project (project name is the reference)
3) Project_list_Revenues: here I have all revenues for each project (project name is the reference)
One project eleme...
I have been trying out the MS Ajax Toolkit Preview 6
I am trying to hook up a
html table to a ...
ms toolkit dataview control ...
and the the dataview control get its data from an asp.net mvc controller methoid that rets Json.
But I am having an issue with send params to the asp.net mvc end point with the fetchData.
It all goe...
Hi,
How could I (/is it possible) to add a custom column to my DataView, and in this column display the result of a specific calculation.
That is, I currently have a dataGridView which has a binding to a DataView, based on the DataTable from my database. I'd like to add an additional column to the dataGridView to display a number whic...
Hi,
I have declared BindData as:
Private Sub BindData()
'hfSearchText has the search string returned from the grid
If hfSearchText.Value <> "" Then
EntityDataSource1.Select += " where " & hfSearchText.Value
End If
Dim dv As DataView = DirectCast(EntityDataSource1.[Select](New DataSourceSelectArguments()), DataView)
'hfSort has the sort...
I populate a DataTable, then sort the DefaultView of that DataTable. When I set the DataTable as the source for my report, the sort doesn't work. In case it helps, here is the code (GetData returns a valid DataTable):
Dim dt As DataTable = a.GetData(Parm1, Parm2, Parm3)
If rbtSortByField1.Checked Then
dt.DefaultView.Sor...