|
-
Jan 11th, 2011, 09:47 PM
#1
Thread Starter
Lively Member
[RESOLVED] Rebind Sqldasource on controlparameter changed
I have a gridview connected to sqldatasource and regular textbox.
In sqldatasource I defined selectparameters controlparameter to textbox.
I'm trying to rebind gridview when textbox text is changed.
So question is how can I rebind sqldatasource?
-
Jan 12th, 2011, 12:53 AM
#2
Re: Rebind Sqldasource on controlparameter changed
Hey,
Can you show the ASPX markup for the page that you are using?
You would either have to set the TextBox AutoPostBack property to true, so that the page post backs each time the text changes, or you would need to provide a Button which the user could push once they have finished editing the textbox, to then post back the page to the server, thus rebinding the controls on the page.
Gary
-
Jan 12th, 2011, 08:07 PM
#3
Thread Starter
Lively Member
Re: Rebind Sqldasource on controlparameter changed
 Originally Posted by gep13
Hey,
Can you show the ASPX markup for the page that you are using?
You would either have to set the TextBox AutoPostBack property to true, so that the page post backs each time the text changes, or you would need to provide a Button which the user could push once they have finished editing the textbox, to then post back the page to the server, thus rebinding the controls on the page.
Gary
thanks. autopostback solved it.
-
Jan 12th, 2011, 09:13 PM
#4
Re: [RESOLVED] Rebind Sqldasource on controlparameter changed
Hey,
Glad you got it sorted!
The only thing to bear in mind here is that this means that every time the text changes, a post back to the server occurs. That is a lot of round trips, which may take quite a while. Just something to bear in mind.
Gary
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|