datatable

ADO.net Question - How can I update a column in a Row of a DataTable with RowChanged without triggering infinite loop?

Hi, How can I update the column value (programmatically) in a Row of a DataTable via use of the RowChanged event, without triggering infinite loop? (which I currently get) Note I do not want to use the DataColumn.Expression property. For example the following gives me a recursive loop and stack overflow error: DataColumn dc = new...

is there a way to change the jquery datatable filter behavior

with a moderm browser, the jquery datatable plugin works very well but in ie6 i find that its almost impossible to type in teh filter textbox as the keypress filtering is insanely slow so the browser can't keep up with your typing. is there anyway to change the behavior so that it only searches and filter on enter key compared to every ...

DataTable.Select() - Comparing GUIDs

Hello, I've a datatable with a column containing GUIDs. I want to select a row matching a specific GUID. I wrote the following code, DataRow[] dRows = dtListSettings.Select("ListGUID = " + Convert.ToString(ViewState["GUID"])); The GUID i'm comparing is 500c2b6a-a3a7-457f-90ed-c96768d91520. But i'm getting the error - Syntax error: Mi...

WPF Datagrid using MVVM.. is two way binding to DataTable possible?

I have a datagrid in my View with it's ItemSource bound to a DataTable in my ViewModel. When I update the DataTable programmatically (adding a column through a command) the changes are not populated to the View. Also, if I invalidate the View, by switching to another tab and then switching back, the changes made are shown. My ViewModel ...

Check Constraints on DataRow Add

DataTable dt = new DataTable(); dt.Columns.Add(new DataColumn("ValueOne",typeof(string)){AllowDBNull = false}); dt.Columns.Add(new DataColumn("ValueTwo",typeof(string)){AllowDBNull = false}); DataRow row = dt.NewRow(); row["ValueOne"] = "Test1"; if (dt.Rows.CanAdd(row)) { dt.Rows.Add(row); } Is ...

ASP.Net - C# - SQL Server - Refreshing cached DataTable with only records that have changed.

I have a large DataTable cached in my web app that is the result of a complex query that returns a large data set. Whilst this data table is cached the query that runs to "refresh" this cache still takes a long time, largely due to the sheer amount of data being returned. In order to speed this up I am considering implementing a timesta...

Obtain DataTable names from Flex

I have a C# web service that returns a DataSet with multiple DataTables. It's easy enough to get at the data using this web service event handler in Flex: static public function getData_Handler(event:ResultEvent):void { for each(var table:Object in event.result.Tables) { // ... } } How can I access the name of ea...

SqlDataAdapter.Fill - Asynchronous approach

Using C# / .NET 3.5. Currently I'm populating 2 DataTables one after the other using SqlDataAdapter.Fill(). I want to populate both of these DataTables in parallel, at the same time by doing each one asynchronously. However, there is no asynchronous version of the Fill() method - i.e. BeginFill() would be great! One approach I've trie...

DataTable and List object comparison.

i m a part of an ERP solution team and want to measure the performance in terms of development. By a simple process a DataTable is populated from database with 10000 odd records and on other hand a List object is filled with the same records. my question is, which one is the lightweight and performance measurable object and why. ...

Customized sorting on DataTable in C#?

This is a C# Winform question. I have a DataGridView which is bounded to a DataTable. I construct the DataTable myself, which several DataColumn instances. When the DataTable is bound to the DataGridView, by default, every column is sortable by clicking the headers of the DataGridView. But the sorting behavior is something "by default"....

Simple way to convert datarow array to datatable

Hi.. I want to convert an datarow array into datatable.. Wat is the simple way to do this? Thanks in advance!! ...

Expand collapse of table rows in Datatable JSF

Hi, I have been trying to achieve this functionality of expand/collapse of table rows using core JSF and also I have to preserve the sorting. Is there a way in core JSF where I can achieve this functionality? ...

Generating id for tr datatable JSF

Is it possible to progrmmatically generate id for the <tr> in datatable? ...

jsf datatable limiting user result

I was wondering how could I be able to show users warning or information to refine the search if their search result exceeds 100. For example: if the search results are more than 100 then display only hundred and show users warning to refine the search, in JSF/datatable. Any help would be highly appreciated. Thanks ...

Generate id for row in JSF datatable

I am trying to achieve the expand/contract functionality of table rows in JSF using core faces implementation. As answered in one of my earlier thread this is not straight forward to achieve in core faces implementation. So, I thought of using HTML + jQuery to achieve the functionality. I am calling the row with +/- gif as parent row and...

What's the best way to read a tab-delimited text file in C#

We have a text file with about 100,000 rows, about 50 columns per row, most of the data is pretty small (5 to 10 characters or numbers). This is a pretty simple task, but just wondering what the best way would be to import this data into a C# data structure (for example a DataTable)? ...

Which one is faster DataTable or ArrayList? searching point of view.

i have got any no of records in datatable with id field and other fields.. and i have got a arraylist which have got all id of datatable's records.. now i need to check that the perticular id exist in records or not.. for that i can check in datatable or i can check in arraylist (because arrylist also contain all those ids).. so please t...

Dynamically Move Table Cell (up/down)-javascript

Group, I have a table that is dynamically built with device ids. I have a "swapCell" that moves the cells up and down when the user clicks on (up/dwn) buttons. I have a delete row function that deletes current row. -Problem is: If I have six rows (1,2,3,4,5,6) and six id's (id=row1,id=row2,id=row3,id=row4,id=row5,id=row6) -And dele...

Linq to DataSet - Handling Null Values

I have a requirement to convert LINQ to DataTable. I stole the following Extension Method from StackOverflow: public static DataTable ToDataTable<T>(this IEnumerable<T> items) { var tb = new DataTable(typeof(T).Name); PropertyInfo[] props = typeof(T).GetProperties(BindingFlags.Public ...

Handling Null in WriteXml

For coonverting Linq to DataTable I am using the following Extension Method(Taken from Stackoverflow) Linq to DataTable public static DataTable ToDataTable<T>(this IEnumerable<T> items) { DataTable table = new DataTable(typeof(T).Name); PropertyInfo[] props = typeof(T).GetProperties(BindingFlags.Public | ...