datatable

How to change results per page value in datatables

Datatables has an option to select the number of records shown per page. The default value starts from 10, 25, 50 and 100. How can I change it to start from 5 instead of 10? 10 records is a bit too much and takes a lot of space in my current design. Thanx! http://datatables.net/ ...

c# datatable primary key issue

So I have a table in an Oracle database that I'm basically trying to replicate in C# along with its primary key. I can load the table just fine, but then when I try to add the same primary key constraint as the oracle table, I get this error : "These columns don't currently have unique values". Here's the code DataTable dt = new Da...

Loading google datatable using ajax/json

I can't figure out how to load a datable using ajax/json. Here is my json code in a remote file (pie.json) { cols: [{id: 'task', label: 'Task', type: 'string'}, {id: 'hours', label: 'Hours per Day', type: 'number'}], rows: [{c:[{v: 'Work'}, {v: 11}]}, {c:[{v: 'Eat'}, {v: 2}]}, ...

Bound textbox not updating upon DataTable change

I have bound several textboxes to different rows in a DataTable, like this: txtCurLevel.DataBindings.Add("Text", dtTop, "CURR LEVEL"); txtNewLevel.DataBindings.Add("Text", dtTop, "NEW LEVEL"); txtProduct.DataBindings.Add("Text", dtTop, "P LINE"); txtCurRev.DataBindings.Add("Text", dtTop, "CURR REV"); Th...

Simple syntax problem null check datatable / gridview asp.net vb

I have this code: Dim Result As New DataTable DataAdapter.Fill(Result) 'bind data to visible surname/name grid If Result.Rows.Count = 0 Then NoInputBottom.Text = "No Results. Please widen your search criteria and try again" NoInputTop.Text = "No Results. Please widen your search ...

Records fetch for DataTable

Hi, I have added 1000 records into DataTable using C#.Net. This data table contains TimeStamp column for specified data stored time. Data stored into 10.00AM to 11.00AM every 10 seconds once. Here i want to fetch only 10.15AM to 10.30AM records using C#. Thanks ...

Get drop down selection from GridView on button press

I have an ASP.NET GridView that has four columns. The first three are typical BoundField elements bound to a DataTable. The forth is a TemplateField element that I create a DropDownList in on the OnRowCreated event for the GridView. What I'm attempting to do is walk down the data source for the GridView when a button is pressed. I re...

jsf datatable lazy load filter and sorting

Hi, I have worked on several projects with a lot of data tables. The tables had sorting, filtering and paging of course on server side and with help of the db (all databases has implemented sording, filtering -where and limit the returned results). When workig on real application there are a thousands of even a millions rows. But I ha...

mysql medium int vs. int performance?

Hi, I have a simple users table, i guess the maximum users i am going to have is 300,000. Currently i am using: CREATE TABLE users ( id INT UNSIGEND AUTOINCEREMENT PRIMARY KEY, .... Of course i have many other tables that the users(id) is a FOREIGN KEY in them. I read that since the id is not going to use the f...

WPF BindingListCollectionView to ListCollectionView for DataTable as ItemsSource

Hi everyone, I want to do custom sorting on a ListView which has a DataTable as ItemsSource: myListView.ItemsSource = (data as DataTable); And this are the first lines of my sorting function: DataView view = (myListView.ItemsSource as DataTable).DefaultView; ListCollectionView coll = (ListCollectionView)CollectionViewSource.GetDefa...

Datatable add new column and values speed issue

I am having some speed issue with my datatables. In this particular case I am using it as holder of data, it is never used in GUI or any other scenario that actually uses any of the fancy features. In my speed trace, this particular constructor was showing up as a heavy user of time when my database is ~40k rows. The main user was set_...

how to join two datatable datas into one datatable to show in one gridview in asp.net

how to join two datatable datas into one datatable to show in one gridview i.e in 1 datatable i have username and pwd and in another datatable i have that user details. how to show all these in one datatable to get those values display in gridview(asp.net) any idea???? ...

Remove duplicate column values from a datatable without using LINQ

Consider my datatable, Id Name MobNo 1 ac 9566643707 2 bc 9944556612 3 cc 9566643707 How to remove the row 3 which contains duplicate MobNo column value in c# without using LINQ. I have seen similar questions on SO but all the answers uses LINQ. ...

Using Aggregate functions in DataView filters

hi, i have a DataTable that has a column ("Profit"). What i want is to get the Sum of all the values in this table. I tried to do this in the following manner... DataTable dsTemp = new DataTable(); dsTemp.Columns.Add("Profit"); DataRow dr = null; dr = dsTemp.NewRow(); dr["Profit"] = 100; dsTemp.Rows.Add(dr); dr = dsTemp.NewRow(); d...

Bind SQLiteDataReader to GridView in ASP.NET

Hi, dr looks like it is populated but I get a nullreferenceexeception when I try to bind to the gridview EDIT The following code (except the GridView is a dataGridView) in a c# application works, why is it nullreference in ASP.NET? EDIT here is the c# app SQLiteConnection cnn = new SQLiteConnection("Data Source=c:\\log.db"); ...

How to delete multiple rows in a DataTable?

Hi, How can I delete specific DataRows within a loop of a DataTable rows which meet a custom condition -lets say the rows having an index of even number-? (Without using LINQ) Thanks ...

Can YUIs DataTable have resizeable but not moveable columns?

I have implemented column resizing with YUIs DataTable as demonstrated in this example: http://developer.yahoo.com/yui/examples/datatable/dt_complex_clean.html Is there anyway to enable column resizing without column moving? ...

JQuery AutoComplete with JEditable

Hi, I am trying to attach AutoComplete of JQuery with JEditable. Got the following eg on search. But it also does not seem to work. http://www.pastie.org/978610 I want to attach AutoComplete to <td> of DataTable(Allan Jardine). Does anybody have any code snippet for the same? Pl help.. Thanks, Bhoomi. ...

Updating tables with Linq expressions

Most of the examples I've found deal with Linq to entities, which is not what I need. I have a standard DataTable which I need to modify before returning to the caller. I can iterate over the normal Table.Rows collection or do something like this with the new extension methods: foreach (var x in table.AsEnumerable()) { if (x.Field<i...

<rich:datatable> and <rich:datascroller> problem

Hi all, I am developing a Seam-Jsfv1.2-EJB3 web app. I have a datatable and checkboxes in each row. Moreover, I have a datascroller at the bottom of my table as well. My problem is when I click the next page number from the scroller, the selected checkboxes at the first page of the datatable is gone. I mean, even if they were selected...