Sorry. I just noticed you are really using a DataGrid ? Are you still using
.NET 1.1 ? 2.0 I would say as you are using a SqlDataSource which is likely
new also in 2.0.
The DataGrid is AFAIK here mainly for legacy support. I would strongly
suggest to use a GridView instead. If you can then :
- replace your DataGrid control with a GridView.
- suppress the DataBind call, this is done for you when using a GridView
control
and paging should work wihtout any other change !!!
IMO the problem is that the DataGrid is AFAIK here mainly for legacy support
and perhaps doesn't support all the features against the newer data sources
(not sure but I believe we had to code for handling sorting and perhaps in
some cases paging depending on the datasource, this is doen automatically in
most if not all cases when using a GridView). I'm afraid that if you need to
keep using a DataGrid control you'll have to implement custom code to handle
paging.
Is using a GridView acceptable ?
--
Patrice
> Sorry. I just noticed you are really using a DataGrid ? Are you still using
> .NET 1.1 ? 2.0 I would say as you are using a SqlDataSource which is likely
[quoted text clipped - 20 lines]
> --
> Patrice
I don't have any problems with the GridView.
it's just that, I am preparing a course and in order to explain
ADO.NET in detail, for me things can be explained more clearly using
the DatGrid and SqlDataAdapter as I have done in the past.
I guess I'll have to find another way to explain it.
than you again for your time
best regards
Chris
cmrchs@gmail.com - 23 Jul 2008 19:42 GMT
On Jul 23, 8:30 pm, cmr...@gmail.com wrote:
> > Sorry. I just noticed you are really using a DataGrid ? Are you still using
> > .NET 1.1 ? 2.0 I would say as you are using a SqlDataSource which is likely
[quoted text clipped - 31 lines]
> best regards
> Chris
Patrice,
is it still possible to use the sqlDataAdapter, 'cause adding it to
the toolbox doesn't work (see post in this newsgroup "can not add the
SqlDataAdapter to the toolbox ???")
'cause without it i don't see how i can use the DataSet in the new
method, with the GridView and SqlDataSource-control
thank you
Chris
Patrice - 24 Jul 2008 09:10 GMT
> I don't have any problems with the GridView.
> it's just that, I am preparing a course and in order to explain
[quoted text clipped - 6 lines]
> best regards
> Chris
Hummm.. your previous sample uses a SqlDataSource, not a SqlDataAdapter ???
The sample code you provided will work with only the two changes I mentioned
(i.e. using a GridView and DataBind is not even needed).
Now is this some other code that you would like to make work. I'm a bit
confused... In all cases using a GridView will IMO be more likely easier
and closest to what your students could have to use...
--
Patrice
> Sorry. I just noticed you are really using a DataGrid ? Are you still using
> .NET 1.1 ? 2.0 I would say as you are using a SqlDataSource which is likely
[quoted text clipped - 20 lines]
> --
> Patrice
Patrice,
is it still possible to use the sqlDataAdapter, 'cause adding it to
the toolbox doesn't work (see post in this newsgroup "can not add the
SqlDataAdapter to the toolbox ???")
'cause without it i don't see how i can use the DataSet in the new
method, with the GridView and SqlDataSource-control
thank you
Chris