dataview

Telerik RadGrid bound to web service without Linq

I want to bind a Telerik RadGrid to a web service without using Linq. In all examples I can find, the web service has to return a List(Of MyObject); I've tried this, and it works great. However, the table I'm binding to may at runtime have additional columns, or columns may have different data type, so I can't use a static MyObject class...

Select top N rows AFTER sorting from Dataview in c#

Hi, 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 = Dv; repeater.DataBind(); Now, I just want to bind the top 5 rows in this Dataview. If I try this: DvP...

List<T> to DataView

Hi, How to convert List to a dataview in .Net. ...

Difference between DataView.Sort and DataTable.OrderBy().AsDataView()?

I have a DataGridView which is bound to a DataTable that contains a column of custom types that I need to sort by. This custom type (MyCustomType) implements IComparable<MyCustomType> which is how I wanted the sorting to work. I tried 2 methods to create a DataView which I would use as the grid's data source: MyDataTable dt = new MyDa...

Binding to a Guid on a DataView

Hello, first post here but I'm a frequent visitor =) I have a WPF application with .NET 4.0 and Visual Studio 2010 which uses DataViews (coming from an SQL Server 2008). I have two tables which looks like this Table1 GUID (Primary Key, UniqueIdentifier) Table2_GUID (UniqueIdentifier) Table2 GUID (Primary Key, UniqueIdentifier) ...

ASP.NET DataView - problem with RowFilter and application cache

Good afternoon ladies and gents -- I've been tasked with finding and fixing a bug in an unfamiliar legacy application that had some recent changes made to it, but I don't have an easy way (that I know of) to test my theory. I'm hoping your collective knowledge will verify the test for me. This application lazy loads lookup lists (tongu...

Sorted dataview to datatable

Hello, i have the following method: private DataTable getsortedtable(DataTable dt) { dt.DefaultView.Sort = "Name desc"; //I would need to return the datatable sorted. } My issue is that i cannot change the return type of this method and i have to return a DataTable but i would like return it sorted. Are there any magic hidde...

Locate row in DataGridView when bound DataView sorted by different column in .NET

I have a DataGridView with a DataTable set to its DataSource. The DataTable has two columns. The user has a TextBox which dynamically (after each keypress) searches for a match in the first column. I want to jump to the matching record (if any) after each key entry, so it needs to be fast. I use the Find() method on the DefaultView of ...

Dataview Filteration Problem

Can some one help with with the following code please!! if (DiaryOccasions != null && DiaryOccasions.Rows.Count > 0) { DataTable dtFilteredOccasions = new DataTable(); if (ddlMonths.SelectedItem.Value != string.Empty) { string[] selMonthYear = ddlMonths.SelectedItem.Value.Split('/'); if(selMonthYear.Length ...

Error with pageDataSource and Dataview "Index 40 is either negative or above rows count."

I am working with Gridview and implementing custom paging with PagedDataSource. there is also some search criteria in this page with which I reset the Grid with the New data according to search criteria. Problem is that sometime when I try to Bind the Grid with PagedDataSource it gives the error "Index 40 is either negative or above ro...

Databinding in .NET - Datatables, Dataviews and BindingSources

Hello, When binding to datatables in visual studio, it sets the datasource of a bindingsource to the selected datatable - which is fine and is what is expected. However, the datasource is actually pointing to a dataview of that datatable. I'm currently implementing custom business object base classes which include collection classes. I...