Hi...
My program make a select to an table and return the results to a
datagrid, it's all ok with dataset, but in large tables it needs to get
the entire table to show in datagrid and sometimes it takes much time...
So I thik of use the datareader, but how can I bind the data that it is
picking from the database to the datagrid???
thx...
*** Sent via Developersdex http://www.developersdex.com *** 6 5080
Hi,
Using the same way:
SqlDataReader reader = GetReader();
datagrid.DataSo urce = reader;
datagrid.DataBi nd();
reader.Close();
Note that you NEED to close the datareader !!! , otherwise you could let the
connection open.
Have you considered pagination?
cheers,
"Ricardo Luceac" <rl*****@gmail. com> wrote in message
news:OM******** ******@TK2MSFTN GP15.phx.gbl...
Hi...
My program make a select to an table and return the results to a datagrid, it's all ok with dataset, but in large tables it needs to get the entire table to show in datagrid and sometimes it takes much time...
So I thik of use the datareader, but how can I bind the data that it is picking from the database to the datagrid???
thx...
*** Sent via Developersdex http://www.developersdex.com ***
Hi,
Using the same way:
SqlDataReader reader = GetReader();
datagrid.DataSo urce = reader;
datagrid.DataBi nd();
reader.Close();
Note that you NEED to close the datareader !!! , otherwise you could let the
connection open.
Have you considered pagination?
cheers,
"Ricardo Luceac" <rl*****@gmail. com> wrote in message
news:OM******** ******@TK2MSFTN GP15.phx.gbl...
Hi...
My program make a select to an table and return the results to a datagrid, it's all ok with dataset, but in large tables it needs to get the entire table to show in datagrid and sometimes it takes much time...
So I thik of use the datareader, but how can I bind the data that it is picking from the database to the datagrid???
thx...
*** Sent via Developersdex http://www.developersdex.com ***
"Ricardo Luceac" <rl*****@gmail. com> wrote in message
news:Oc******** ******@TK2MSFTN GP10.phx.gbl...
Sory but what is that GetReader()???
That is any method that you use to get a DataReader, you hvae to change it
to reflect the name you used.
What is Pagination...
Is how you display a large table, you show only X records and use some way
to go a Next and/or Prev
cheers,
see ya...
*** Sent via Developersdex http://www.developersdex.com ***
"Ricardo Luceac" <rl*****@gmail. com> wrote in message
news:Oc******** ******@TK2MSFTN GP10.phx.gbl...
Sory but what is that GetReader()???
That is any method that you use to get a DataReader, you hvae to change it
to reflect the name you used.
What is Pagination...
Is how you display a large table, you show only X records and use some way
to go a Next and/or Prev
cheers,
see ya...
*** Sent via Developersdex http://www.developersdex.com *** This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Al |
last post by:
in order to implement sorting, paging in a datagrid, can I
have the datasource of the datagrid a datareader or it
must be a dataset then I create a dataview and make it a
datasource of the datagrid?
The reason I am asking this question is because I already
created a datagrid and made its datasource a datareader,
yet, could not implement sorting or paging. Any idea of
how to approach it .
thanks
|
by: Ricardo Luceac |
last post by:
Hi...
My program make a select to an table and return the results to a
datagrid, it's all ok with dataset, but in large tables it needs to get
the entire table to show in datagrid and sometimes it takes much time...
So I thik of use the datareader, but how can I bind the data that it is
picking from the database to the datagrid???
thx...
|
by: timmso |
last post by:
I got this sample of code from Mike Moore in response to my question of how
I create clickable links from a data source.
<asp:Repeater id="Repeater1" runat="server">
<ItemTemplate>
<asp:HyperLink id="HyperLink1" runat="server" NavigateUrl='<%#
"http://localhost/ngrid1/repeater.aspx?a=" & Container.DataItem("au_lname")
%>'>'<%# DataBinder.Eval(Container.DataItem, "au_fname")%>'</asp:HyperLink>
<br>
</ItemTemplate>
|
by: AFN |
last post by:
I need to manually create the data to be shown in a datagrid (or some data
table object). Should I create an array and bind the array to the
datagrid OR should I create a temporary dataset and bind that to the
datagrid? I have never done either (usually I get a recordset from a
stored procedure and bind results directly). I also don't know which is
faster. Whichever you suggest, can you give a couple lines of sample code?
Thank...
|
by: Bart Schelkens |
last post by:
Hi,
I have 2 more questions :
1. Can I fill a datagrid by using a DataReader or does it have to be a
DataSet or a DataView?
2. In my datagrid I need to display two images and one of does images has te
be a link to a new page. How would you do that ?
| |
by: Shapper |
last post by:
Hello,
I have this code to bind a DataGrid to a DataReader when page loads:
Sub Page_Load(Sender As Object, e As EventArgs)
dgContent.DataSource = drContent
dgContent.DataBind()
End Sub
It's not working.
What is wrong?
|
by: Fred Flintstone |
last post by:
Just new to .net, and started using oledb connection to database. After
getting most things working, now want to bind to a datagrid, but have not
been successful as of yet.
Will use alternate db connection with dataset if necessary, but hoping not
to mix connection types in same project, and hoping not to rewrite existing
code using other methonds.
Any assistance appreciated.
|
by: Niclas |
last post by:
Hi,
I am using a SQL query that uses a CURSOR to loop and executes a SELECT
statement in each loop. When I bind a datagrid to this stored procedure
through a datareader as data source, I only get the first SELECT statement
in the grid.
Is there a known workaround to this ?
Niclas
|
by: pbd22 |
last post by:
Hi.
I am returning to an old bit of code in our program and need to figure
out how to sort
my columns on bind. I am sorting on Date (mostly) and some other
values.
Problem is, the code is an ArrayList that seems to do some
tricky stuff with a chache object and I am unable to get any sort of
sorting happening.
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |