datatable

How to view a DataTable while debuging

I'm just getting started using ADO.NET and DataSets and DataTables. One problem I'm having is it seems pretty hard to tell what values are in the data table when trying to debug. What are some of the easiest ways of quickly seeing what values have been saved in a DataTable? Is there someway to see the contents in Visual Studio while deb...

c# datatable insert column at position 0

Hi, does anyone know the best way to insert a column in a datatable at position 0? ...

c#, Set datagridview column format after datasource has been set

hi, i have a datagridview that i have populated programmatically and i was wondering how i can make one of the columns conform to a specified format - "C2". Can this be done after the datasource has been assigned? Cheers. ...

Is it possible to dynamically change the page size in a YUI Paginated Datatable?

I have a YUI Datatable which is paginated. The height the datatable is able to use can change. What I want to happen is that when there is a size change (which I already have a handle on), I can take the new height and find how many rows are going to fit in a page, then change the datatable or it's paginator to have that number of rows. ...

Creating a SQL Server table from a C# datatable

I have a DataTable that I manually created and loaded with data using C#. What would be the most efficient way to create a table in SQL Server 2005 that uses the columns and data in the DataTable? ...

SPGridView, data and correct method of ensuring data is safe

Hi, I am using an SPGridView to present some data, and have enabled the filtering ability which works very well. Until you choose a particular item in the data to filter on... The data item in question has an apostrophe in the string( e.g. "this is richards' string"), which causes the post-filter-application page load to die with the ...

DataTable instead of Entity framework in Asp.Net MVC

Hello, How do I use Datatable instead of Entity framework in Asp.Net mvc? I'm referring to this tutorial on the asp.net Website .... http://www.asp.net/Learn/mvc/tutorial-21-cs.aspx ....Can I return a datatable instead of a movie or movielist object?? ...

How do I convert a datatable into a POCO object in Asp.Net MVC?

How do I convert a datatable into a POCO object in Asp.Net MVC? ...

Exporting/updating to a data source using a DataSet with a variable schema

I'm using a tree structure in an application I'm writing, and have written recursive methods that will iterate down the tree and populate a number of new DataTables with values. I want to be able to export these tables to a data source, and then later update that data source when the tree or members of the tree change. There are a few ...

Populate a Woodstock JSF Table

I'm using Netbeans and trying to populate a Table component with my data, but the examples that are available only show how to do it with a DB. How can I populate the table e.g. with random data? The JSF code is: <webuijsf:table augmentTitle="false" id="table1" style="left: 312px; top: 216px; position: absolute; width: 450px" title="T...

Databinding, dataset with datarelations, and refreshing single DataTable from DB

In a nutshell: I have a DataSet with multiple DataTables inside, which are connected via multiple DataRelations. I've created a form using databinding on this DataSet, and you could say it is pretty complex. The scenarios is next: the main purpose of the form is the insertion of a new record. For it to be inserted, various parent-child ...

Single column in JSF DataTable displaying wrong data

We are using JSF, Seam, and Hibernate. I am debugging a view that has a JSF Datatable that is getting its data from an EntityQuery. The EntityQuery has only the method getEjbql defined and is returning a query like "select viewA from ViewA viewA". The JSF DataTable is displaying the data correctly except for one column which is displayin...

Returning DataTable objects with WCF service

This is a strange problem that I am having with WCF trying to send DataTable in the response. I have the following service contract: [ServiceContract] public interface ISapphireDataService { [OperationContract] DataTable LoadData(string query, DateTime start, DateTime end); [OperationContract] string LoadDataTest(); } ...

Displaying DB query data as a table

I am bit new to C#. I am working on a Database application and I need to execute a query say a SELECT and load it in to some sort of table view. Then I want to double click on a result and get it loaded to my original data entry form. Can someone tell me the way that I should follow? Dont waste your time to add coding etc. Simply the ste...

How to update all the autoincrement columns in a DataTable?

I have a DataTable with an "Id" column, which is an identity column in our SQL Server 2005 database. This column has the AutoIncrement property set to true. I don't fill the table with data from the DB, since I use it only for inserts, so it assigns bogus Ids starting from 1. But after I call the tableAdapter.Update(), I'd like to have ...

C#: How do I iterate the contents in a DataColumn?

I have a database column I simply need to check to see if a value is there. DataTable dt = masterDataSet.Tables["Settings"]; DataColumn SETTINGS = dt.Columns["DEFAULTSETTINGS"]; I just need to iterate over the values in this column to see if a value exists. Help ...

Performance Diff on using DataTable vs ArrayList as Datasource on ASP .NET

I am currently working on a web application. I was just wondering which has a better performance when used as a DataSource for say a DataGridView or a DropDownList control. I believe that DataTable is harder to create unless you get it from a DataReader but if you have a ORM layer that abstract the use of DataAccess classes like DataRea...

Insert a Datatable into mysql database in asp.net

Is there a way to insert a dynamically generated datatable into mysql database in asp.net? ...

Casting generic datatable to typed datatable

I need to reuse a DataAccess method prescribed by client. This method returns a vanilla datatable. I want to cast this datatable to my Typed datatable. The amount of columns and their types will match. The exception message "Unable to cast object of type 'System.Data.DataTable' to type 'MarketValueDataTable'." is very clear, but how do ...

Getting information from my loaded DataTable.

How can I get information from my datable? I just want to get column from start to finish, and load them to textboxes.text. ClienteHolder.IDCliente = Tabla.Rows[]????? ...