473,395 Members | 1,466 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Datagrid binding

Hi all,

It may be a very simple query, but i am stuck with having
millions of record showing instantly in chunks of 100 or
200 record(not a paging concept), in vb i use to bind the
data to ado datacontrol which is binded to datagrid and
data is instantly shown using ado events and methods in a
user friendly manner i.e data is shown and fetched
simultaneously.

In vb.net if i am using dataset and binding that dataset
to grid, the data is not shown till all the records are
fetched and i don't know how to bind it to datareader,
also i don't know how to use threads to achieve this, can
anyone help me out with some piece of code to get me
started.

Thanks,
Ashwani.
Nov 20 '05 #1
5 2892
Cor
Hi Ashwani,

Making a dataset of all your records is in my opinion not the right way,
You can make smaller tables using by instance in the select clause the
"Where"

One of the posibilities is let the user first select it using a combobox
where you only did fill a dataset with the showmember and the keyfields from
a parent database table

Just a thought, but there are of course thousands of other ways.

I don't think that using the datareader will help you much further, you have
to do a lot of work yourself
- making the dataset
- making the datatable
- making the columns
- creating the keys
- read all rows
- filling item by item all the rows
- add the rows to the table
and all I forget.
And then I think the result will be the same.

If you don't know how to create a dataset with a fill, that is roughly
written as pseudo
\\\
dim mydataset as new dataset
(connection, dataadapter, and commandbuilder need a prefix as Oledb or SQL)
dim myconnection as new connection("connectionstring")
dim mydataadapter as new dataAdapter("MySQLWhereString",myconnection)
mydatadapter.fill(mydataset)
///

I hope this helps

Cor

It may be a very simple query, but i am stuck with having
millions of record showing instantly in chunks of 100 or
200 record(not a paging concept), in vb i use to bind the
data to ado datacontrol which is binded to datagrid and
data is instantly shown using ado events and methods in a
user friendly manner i.e data is shown and fetched
simultaneously.

In vb.net if i am using dataset and binding that dataset
to grid, the data is not shown till all the records are
fetched and i don't know how to bind it to datareader,
also i don't know how to use threads to achieve this, can
anyone help me out with some piece of code to get me
started.

Nov 20 '05 #2
Hi,

http://www.dotnet247.com/247reference/msgs/5/27771.aspx

Ken
---------------
"Ashwani Gaur" <ga**********@netsity.com> wrote in message
news:03****************************@phx.gbl...
Hi all,

It may be a very simple query, but i am stuck with having
millions of record showing instantly in chunks of 100 or
200 record(not a paging concept), in vb i use to bind the
data to ado datacontrol which is binded to datagrid and
data is instantly shown using ado events and methods in a
user friendly manner i.e data is shown and fetched
simultaneously.

In vb.net if i am using dataset and binding that dataset
to grid, the data is not shown till all the records are
fetched and i don't know how to bind it to datareader,
also i don't know how to use threads to achieve this, can
anyone help me out with some piece of code to get me
started.

Thanks,
Ashwani.

Nov 20 '05 #3
Hi Cor,

Thanks for your reply, paging option you suggested is my
last option, i want my application to be user friendly
then processor friendly, i.e. when user presses some
button suppose Load Data, the grid starts filling with
data, that data could either come from dataset or
datareader and simultaneouly user will be able to see the
progress of data fetch by means of some message or so that
this many record have been fetched, user may also be able
to stop the fetch when some particular amount of data have
been fetched.

Any Help.

Thanks,
Ashwani.
-----Original Message-----
Hi Ashwani,

Making a dataset of all your records is in my opinion not the right way,You can make smaller tables using by instance in the select clause the"Where"

One of the posibilities is let the user first select it using a comboboxwhere you only did fill a dataset with the showmember and the keyfields froma parent database table

Just a thought, but there are of course thousands of other ways.
I don't think that using the datareader will help you much further, you haveto do a lot of work yourself
- making the dataset
- making the datatable
- making the columns
- creating the keys
- read all rows
- filling item by item all the rows
- add the rows to the table
and all I forget.
And then I think the result will be the same.

If you don't know how to create a dataset with a fill, that is roughlywritten as pseudo
\\\
dim mydataset as new dataset
(connection, dataadapter, and commandbuilder need a prefix as Oledb or SQL)dim myconnection as new connection("connectionstring")
dim mydataadapter as new dataAdapter ("MySQLWhereString",myconnection)mydatadapter.fill(mydataset)
///

I hope this helps

Cor

It may be a very simple query, but i am stuck with having millions of record showing instantly in chunks of 100 or
200 record(not a paging concept), in vb i use to bind the data to ado datacontrol which is binded to datagrid and
data is instantly shown using ado events and methods in a user friendly manner i.e data is shown and fetched
simultaneously.

In vb.net if i am using dataset and binding that dataset
to grid, the data is not shown till all the records are
fetched and i don't know how to bind it to datareader,
also i don't know how to use threads to achieve this, can anyone help me out with some piece of code to get me
started.

.

Nov 20 '05 #4
Cor
Hi Ken,

Are you sure of that link you gave?

There are 2 answers,
One gives 2 lines of how to make a dataset from a reader while I did give
almost all so that was not the meaning of your message.

The other binds a datareader to a datagrid.datasource, while the
documentation say it has to be a iList

What do I see wrong?

Cor
http://www.dotnet247.com/247reference/msgs/5/27771.aspx

Nov 20 '05 #5
Hi,

Your right. I tried the bottom it does not work. I should have
checked it first.

Ken
----------------
"Cor" <no*@non.com> wrote in message
news:eT**************@TK2MSFTNGP10.phx.gbl...
Hi Ken,

Are you sure of that link you gave?

There are 2 answers,
One gives 2 lines of how to make a dataset from a reader while I did give
almost all so that was not the meaning of your message.

The other binds a datareader to a datagrid.datasource, while the
documentation say it has to be a iList

What do I see wrong?

Cor
http://www.dotnet247.com/247reference/msgs/5/27771.aspx


Nov 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Shivang | last post by:
Hello Everybody, I am using Datagrid in VB.net. I don't want the auto generation of rows in the datagrid (last row shouldnt be the new row with empty values)..in addition to this the datagrid...
0
by: Tom Hughes | last post by:
I want to change one field of all selected rows to a provided value. Problem 1 I am using the Binding Manager Base to bind the datagrid to the appropriate dataTable as recommended by KB817247....
5
by: Jeff | last post by:
IDE: VS 2003 :NET OS: XP Pro My app have a form with a tab-control on it. The tab-control have 2 tabpages. One of the tabpages displays a datagrid, and the other tabpage displays details (order...
4
by: Steve B. | last post by:
I have a DataGrid on the left and TextBoxes (TB) on the right. The TB's reflect the contents of the grid cells. Sorting of columns (both thru VS and programmatically) work fine except, when the...
0
by: Dave | last post by:
Tried posting in the Winform Forum without much luck, so posting here... After inserting a new data row to a DataTable that is bound to a datagrid, I am unable to change data in a row that is...
6
by: Alpha | last post by:
I have several textboxes that I need to chang the text when the selection row is changed in a datagrid. I have the following code. This textbox displayes the initial selection but when I click on...
3
by: vinayak | last post by:
Hi I am displaying data in Datagrid in ASP.NET with Edit/Update functionality for each row. On the same page I have 2 Button controls which submits the request to server. These button controls...
5
by: Brad Shook | last post by:
I am trying to bind one column of a datagrid to a seperate textbox and the rest of the fields to a datagrid. the comments are too large to fit in a datagrid so I created a textbox below the...
17
by: A_PK | last post by:
I have problem databinding the DataGrid with DataView/DataSet after the filter... I create the following proceudre in order for user to filter as many as they want, but the following code is only...
2
by: =?Utf-8?B?Y3JlYXZlczA2MjI=?= | last post by:
I have a nested datagrid in a xaml file, the parent datagrid loads the vendor information and the details loads the documents for that vendor in a datagrid. Everything is working fine until I click...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.