datatable

loading datatable from xml schema

Hi there, I m trying loading data table from xml schema. I can see column names on datatable but, i cant see datas. here is my code: StringReader sr = new StringReader(dsSorgu.Tables[0].Rows[i]["sorguSonucu"].ToString()); s.M_Sonucu = new DataTable(); s.M_Sonucu.ReadXmlSchema(sr); srgKullaniciSorgulari.Add(s); sr contains...

jQuery plugin for datatables

I am working on a datatable which is not very big and I need to implement the following UI Draggable Columns Resizable Columns UI has to have memory across sessions. I have gone through the list of jQuery plugins for datatables and I am not really satisfied with what I was getting. Things like flexigrid and others with YUI or EXTJS ...

combining 3 different datatable into 1 and performance with SQL

I was asked to do a report that combines 3 different crystal reports that we use. Already those reports are very slow and heavy and making 1 big one was out of the question. SO I created a little apps in VS 2010. My main problem is this, I have 3 Datatable (same schema) that were created with the Dataset designer that I need to combine....

Change the value of every cell in a DataTable column

I have a System.Data.DataTable which I'm binding to a GridView. If the user doesn't have a certain security role, I want to replace the data in certain columns with an "X". Can I do this without looping through all of the rows? ...

How can I filter a DataColumn on a TimeSpan value?

Programming in C#.NET. I have a DataTable with a column named Time which is of type System.TimeSpan. When I display the DataTable in a DataGridView I want to filter out all the entries that don't have a time listed. I have tried the following but to no avail. Can you help? DataView myDataView = new DataView(SomeDataTable); myDataView.Ro...

Show sql query result in a grid/table view in android

Hello, I want to build an app that will get a data table from a database e.g.: "SELECT fName,lName, age FROM myTable". and put it in an editable grid that will save changes back to the DB. fName lName age ----- ----- --- Elton John 20 Bob Marley 25 Is it possible to create such grid that can be editable an...

How to add a new row to c# DataTable in 1 line of code?

Hi Is it possible to add a new row to a datatable in c# with just 1 line of code? I'm just dummying up some data for a test and it seems pretty slow to have to write something like this: DataTable dt= new DataTable("results"); DataRow dr1 = dt.NewRow(); dr1[0] = "Sydney"; dt.Rows.Add(dr1); DataRow dr2 = dt.NewRow(); dr2[0] = "Perth"; d...

Multiple copies of data in datatable

How many copies of data does the datatable store ? I found this question from a year before but not a whole lot of details on there ? http://stackoverflow.com/questions/424598/what-is-the-memory-overhead-of-storing-data-in-a-net-datatable Spefically, when do the copies get created? Are they flushed only on .Save() / .Update() ? I have...

How to change DataTable colums order

Hi all, How to change Datatable columns oder in c#. example: am created sql table type order is Qty,Unit,Id but in program DataTable order is Id,Qty,Unit. In code Behind am directly pass DataTable to sql table type so the table order is different. DataTable columns are :`Id,Qty,Unit.` i want this to be :`Qty,Unit,Id` please help...

Fill datagrid with paging enabled in asp.net

Hi, I have datagrid with paging enabled that can have 10 rows per page. Also I have DataTable with 16 rows. I want to fill the datagrid dynamically with 'for' loop to go over all the DataTable and fill the DataGrid. I understand that there is a problem when the counter will hit row 11. Do I need to change the page of the datagrid when ...

most matched field value

Hello, I have a DataTable. I can also use Linq. In a DataTable have many columns, and rows. One of the column is called as feedCode. its type is string. in database it's length is 7 varchar, nullable. feedCode may contain values as 9051245, 9051246, 9051247, 9031454, 9021447. Method must return most matched (in this case starting with...

Save YUI2 DataTable content to $_POST

Hello, I'm populating a YUI2 DataTable from a database (in PHP). Now the user should make changes to the DataTable. These changes should be saved to $_POST so they can be saved to the database again. My problem: The only way to put variables into post seems to be input elements in a form. But the DataTable contains no input elements, i...

WPF Datagrid / Datatable: Large number of rows

I have a Datagrid connected to Datatable, which needs to load a very large amount of rows. To speed things up, I load 10% of the rows, and display the form. Most of the time the user only needs those 10% (they are the most recent entries). In a background thread I load the remaining 90% of the rows into another datatable (SecondData). ...

Right alignment for table cell in pyqt

I have QStandardItemModel and QTableView. I want to have the number align to the right. How can i specify this in pyqt? Now i have it like this (see ID) http://simple-database-explorer.googlecode.com/files/Main2.jpg Working example: self.model.setData(self.model.index(i, j, QtCore.QModelIndex()), value, role=0) if isNumber(value): ...

WPF Datagrid Performance

I have a very large comma-seperated text-file. I need to display this in a WPF Datagrid, which method would result in the highest performance of loading all the data to the grid? I'm only aware of two methods: Using a Datatable, and adding each line as row (looks like overkill) Using an ObservableCollection, creates object for each lin...

C# datatable row ordering after a deletion

Let's say we have a DataTable with rows say: ROW1 ROW2 ROW3 ROW4 ROW5 ROW3 has been deleted. I would like to clarify if the rows strictly follow the order of: ROW1 ROW2 ROW4 ROW5 ... or the order of ROW4 and ROW5 may change? Thanks ...

datatable:make serverside script for filter each column

i want to make my table can filtering in each column. i get client side script from DataTable.net. To make this work, i must make change at server side script for this datatable. My table fields is: Line, Model_name, Version, Lot, Serial_number, ID_number, Lot_no_S_Serial, and Prod_date. i have tried to syncronizing each column to this ...

VB.NET: I have a DataTable I want to Display, is there anyway to do this without binding it to a datagrid or gridview?

I have a datatable and am currently binding it to a datagrid, however, when i go to enable paginating it is very messy. Is there a more malleable method for displaying and paginating aside from using a gridview or datagrid??? Thanks! ...

WPF Datagrid update from background thread

I have a WPF Datagrid with the .ItemSource set to a Datatable. In a background thread, a new Datatable is generated, and needs to be added to the binded Datatable. When i do CurrentTable.Merge(NewTable) from the UI thread, the whole UI freezes for a couple of seconds (since there are so many rows to be added). When I do CurrentTable.Me...

How does pagination work in ASP.NET(Using VB.NET)?

I know how to create and populate a datatable, which i have already done. Now, I simply want to display the datatable on a webform, but I also want to know how to paginate and sort it. Ultimately I do not want to bind this to a datagrid or gridview. I would like to learn how to programmatically do this myself. Can you tell me how to ...