Please help with the coding for navigation, i've a form that is populated with data from the database using a dataset, so it displays the first record, i want to navigate through all the records.
For every data source that you want to bind with a Form, there exist a corresponding "CurrencyManager" object. This CurrencyManager object keeps track of the record as it points to the current item in the record list.
This CurrencyManager is derived from the BindingManagerBase class.
Also a Windows Form that is to be binded to the data source uses a BindingContext object, which is a windows form object.
Now the coding part is as follows:
Sub Page_Load()
Dim bm as BindingManagerBase bm = BindingContext(DatasetName, TableName) bm.Position = 0 End Sub
This bm's position if incremented, ie if we do something like
bm += 1
bm will point to the next record
The number of records can be identified by using bm.count which will surely return an integer.
Thats it...as simple as that...!!!
Revert back for any further clarifications...
Regards,
Ruchika India[/color]
: Hi, : : Please help with the coding for navigation, i've a form that is : populated with data from the database using a dataset, so it : displays the first record, i want to navigate through all the : records. :
First off, what code is being used to bind the form ... what version of ASP.NET is being used?
: [color=Green]Hi, : : Here's the solution to your problem...Read On... : : For every data source that you want to bind with a Form, there exist : a corresponding "CurrencyManager" object. This CurrencyManager : object keeps track of the record as it points to the current item in : the record list. : : This CurrencyManager is derived from the BindingManagerBase class. : : Also a Windows Form that is to be binded to the data source uses a : BindingContext object, which is a windows form object. : : Now the coding part is as follows: : : Sub Page_Load() : : Dim bm as BindingManagerBase : bm = BindingContext(DatasetName, TableName) : bm.Position = 0 : End Sub : : This bm's position if incremented, ie if we do something like : : bm += 1 : : bm will point to the next record : : The number of records can be identified by using bm.count which will : surely return an integer. : : : Thats it...as simple as that...!!! : : Revert back for any further clarifications... : : Regards, : : Ruchika : India[/color] : : : : Hi, : : : : Please help with the coding for navigation, i've a form that is : : populated with data from the database using a dataset, so it : : displays the first record, i want to navigate through all the : : records. : : : :
The code that I provided in my last post works perfectly fine when creating a windows application.
Will be back with the navigation methodology in case of web applications very soon. Inconvenience is regretted.
Regards,
Ruchika[/color]
: This does not work in ASP.NET ... : : First off, what code is being used to bind the form ... what version : of ASP.NET is being used? : : : [color=Green]Hi, : : : : Here's the solution to your problem...Read On... : : : : For every data source that you want to bind with a Form, there exist : : a corresponding "CurrencyManager" object. This CurrencyManager : : object keeps track of the record as it points to the current item in : : the record list. : : : : This CurrencyManager is derived from the BindingManagerBase class. : : : : Also a Windows Form that is to be binded to the data source uses a : : BindingContext object, which is a windows form object. : : : : Now the coding part is as follows: : : : : Sub Page_Load() : : : : Dim bm as BindingManagerBase : : bm = BindingContext(DatasetName, TableName) : : bm.Position = 0 : : End Sub : : : : This bm's position if incremented, ie if we do something like : : : : bm += 1 : : : : bm will point to the next record : : : : The number of records can be identified by using bm.count which will : : surely return an integer. : : : : : : Thats it...as simple as that...!!! : : : : Revert back for any further clarifications... : : : : Regards, : : : : Ruchika : : India[/color] : : : : : : : Hi, : : : : : : Please help with the coding for navigation, i've a form that is : : : populated with data from the database using a dataset, so it : : : displays the first record, i want to navigate through all the : : : records. : : : : : : : :
: Hi, : : Please help with the coding for navigation, i've a form that is : populated with data from the database using a dataset, so it : displays the first record, i want to navigate through all the : records. : hi there, I think you are talking about Paging in asp.net. You want to move cursor as Previous, Next, First and Last. So you i have one article based on it. Just checkout the given link. http://kikosantos.wordpress.com/2006/05/17/custom-paging-in-gridview-control/
I was googling for bindingbasemanager in asp.net. I know it and I have used in many windows application. but today I need same thing on asp.net. I got ur post. could you help me? I am not asking for paging. samething i want what you have posted but in web application.
to ask you only i registered this site. I may forget this website. so I will be greatfull if you write a mail to raj_pushkar[at]yahoo[dot]com. (formatted to prevent deletion of email id, at = @, dot = .) i know you can understand this formated email id but for the safe side i have mentioned..
Comments
Here's the solution to your problem...Read On...
For every data source that you want to bind with a Form, there exist a corresponding "CurrencyManager" object. This CurrencyManager object keeps track of the record as it points to the current item in the record list.
This CurrencyManager is derived from the BindingManagerBase class.
Also a Windows Form that is to be binded to the data source uses a BindingContext object, which is a windows form object.
Now the coding part is as follows:
Sub Page_Load()
Dim bm as BindingManagerBase
bm = BindingContext(DatasetName, TableName)
bm.Position = 0
End Sub
This bm's position if incremented, ie if we do something like
bm += 1
bm will point to the next record
The number of records can be identified by using bm.count which will surely return an integer.
Thats it...as simple as that...!!!
Revert back for any further clarifications...
Regards,
Ruchika
India[/color]
: Hi,
:
: Please help with the coding for navigation, i've a form that is
: populated with data from the database using a dataset, so it
: displays the first record, i want to navigate through all the
: records.
:
First off, what code is being used to bind the form ... what version of ASP.NET is being used?
: [color=Green]Hi,
:
: Here's the solution to your problem...Read On...
:
: For every data source that you want to bind with a Form, there exist
: a corresponding "CurrencyManager" object. This CurrencyManager
: object keeps track of the record as it points to the current item in
: the record list.
:
: This CurrencyManager is derived from the BindingManagerBase class.
:
: Also a Windows Form that is to be binded to the data source uses a
: BindingContext object, which is a windows form object.
:
: Now the coding part is as follows:
:
: Sub Page_Load()
:
: Dim bm as BindingManagerBase
: bm = BindingContext(DatasetName, TableName)
: bm.Position = 0
: End Sub
:
: This bm's position if incremented, ie if we do something like
:
: bm += 1
:
: bm will point to the next record
:
: The number of records can be identified by using bm.count which will
: surely return an integer.
:
:
: Thats it...as simple as that...!!!
:
: Revert back for any further clarifications...
:
: Regards,
:
: Ruchika
: India[/color]
:
:
: : Hi,
: :
: : Please help with the coding for navigation, i've a form that is
: : populated with data from the database using a dataset, so it
: : displays the first record, i want to navigate through all the
: : records.
: :
:
:
The code that I provided in my last post works perfectly fine when creating a windows application.
Will be back with the navigation methodology in case of web applications very soon.
Inconvenience is regretted.
Regards,
Ruchika[/color]
: This does not work in ASP.NET ...
:
: First off, what code is being used to bind the form ... what version
: of ASP.NET is being used?
:
: : [color=Green]Hi,
: :
: : Here's the solution to your problem...Read On...
: :
: : For every data source that you want to bind with a Form, there exist
: : a corresponding "CurrencyManager" object. This CurrencyManager
: : object keeps track of the record as it points to the current item in
: : the record list.
: :
: : This CurrencyManager is derived from the BindingManagerBase class.
: :
: : Also a Windows Form that is to be binded to the data source uses a
: : BindingContext object, which is a windows form object.
: :
: : Now the coding part is as follows:
: :
: : Sub Page_Load()
: :
: : Dim bm as BindingManagerBase
: : bm = BindingContext(DatasetName, TableName)
: : bm.Position = 0
: : End Sub
: :
: : This bm's position if incremented, ie if we do something like
: :
: : bm += 1
: :
: : bm will point to the next record
: :
: : The number of records can be identified by using bm.count which will
: : surely return an integer.
: :
: :
: : Thats it...as simple as that...!!!
: :
: : Revert back for any further clarifications...
: :
: : Regards,
: :
: : Ruchika
: : India[/color]
: :
: :
: : : Hi,
: : :
: : : Please help with the coding for navigation, i've a form that is
: : : populated with data from the database using a dataset, so it
: : : displays the first record, i want to navigate through all the
: : : records.
: : :
: :
: :
:
:
: Please help with the coding for navigation, i've a form that is
: populated with data from the database using a dataset, so it
: displays the first record, i want to navigate through all the
: records.
:
hi there,
I think you are talking about Paging in asp.net. You want to move cursor as Previous, Next, First and Last. So you i have one article based on it.
Just checkout the given link.
http://kikosantos.wordpress.com/2006/05/17/custom-paging-in-gridview-control/
Hope this will help you.
Thanks & Regards
Dilip Kumar Vishwakarma
Programmer
[link=http://www.intelcs.com/]SharePoint Consulting[/link]
If this post
I was googling for bindingbasemanager in asp.net. I know it and I have used in many windows application. but today I need same thing on asp.net. I got ur post. could you help me? I am not asking for paging. samething i want what you have posted but in web application.
to ask you only i registered this site. I may forget this website. so I will be greatfull if you write a mail to raj_pushkar[at]yahoo[dot]com. (formatted to prevent deletion of email id, at = @, dot = .) i know you can understand this formated email id but for the safe side i have mentioned..
Thanks regards
Pushkar Raj