B
Ben Schwehn
Hello,
I've read a few times [1] that you can bind the DataGrid to an
SqlCeResultSet in a way that when the DataGrid is first displayed only
the visible data is retrieved from the (Sql Mobile) database. Further
data is only retrieved when the use scrolls the datagrid. I have not
been able to reproduce this behaviour. What I've tried is:
a)
1. get an SqlCeResultSet by using SqlCeCommand::ExecuteResultSet()
2. set DataGrid:ataSource to the resultset
b) used Visual Studios Data Source (with the datasouce designer
configured to use the SqlCeResultSet instead of the usual DataSet) to
create an DataGrid by drag'n'dropping it on a form
Both test retrieved all data from the database before displaying the
resultset.
So my question is: how can I make the DataGrid only retrieve the
absolutely neccessary data from the db and retrieve furhter data only
when the user scrolls the DataGrid?
Thanks
Ben
[1] e.g. here:
http://groups.google.co.uk/group/mi...read/thread/a124ddaac6bc38c7/547330b85d2e54e6
Quote Ilya Tumanov [MS]: "For SQL Mobile (SQL CE 3.0) you can use new
SqlCeResultSet class which
supports data binding directly.
It's really fast if bound to DataGrid because only visible rows would be
actually retrieved. "
I've read a few times [1] that you can bind the DataGrid to an
SqlCeResultSet in a way that when the DataGrid is first displayed only
the visible data is retrieved from the (Sql Mobile) database. Further
data is only retrieved when the use scrolls the datagrid. I have not
been able to reproduce this behaviour. What I've tried is:
a)
1. get an SqlCeResultSet by using SqlCeCommand::ExecuteResultSet()
2. set DataGrid:ataSource to the resultset
b) used Visual Studios Data Source (with the datasouce designer
configured to use the SqlCeResultSet instead of the usual DataSet) to
create an DataGrid by drag'n'dropping it on a form
Both test retrieved all data from the database before displaying the
resultset.
So my question is: how can I make the DataGrid only retrieve the
absolutely neccessary data from the db and retrieve furhter data only
when the user scrolls the DataGrid?
Thanks
Ben
[1] e.g. here:
http://groups.google.co.uk/group/mi...read/thread/a124ddaac6bc38c7/547330b85d2e54e6
Quote Ilya Tumanov [MS]: "For SQL Mobile (SQL CE 3.0) you can use new
SqlCeResultSet class which
supports data binding directly.
It's really fast if bound to DataGrid because only visible rows would be
actually retrieved. "