PC Review


Reply
Thread Tools Rate Thread

Databinding and order of events

 
 
Rex the Strange
Guest
Posts: n/a
 
      17th Nov 2006
I'm having a problem here and am looking for the answer. I have two
listboxes. One is a dropdown and the other is a simple list of items
which is databound . I want to be able to allow the user to change the
value in the dropdown which would, in turn, change the values in the
list.

So, I create a background routine to change the sql accordingly. Create
routine to respond to the event of the dropdown changing values. Set
autopostback to true. When can I change my sql statement? It seems to
be either before the onselectedindexchanged event fires or, if on the
databinding event of the list, it doesn't fire at all after the first
retrieval.

I'm sure this is a common thing. Please, how is it done?

tia,
rts

 
Reply With Quote
 
 
 
 
Rex the Strange
Guest
Posts: n/a
 
      17th Nov 2006

Rex the Strange wrote:
> I'm having a problem here and am looking for the answer. I have two
> listboxes. One is a dropdown and the other is a simple list of items
> which is databound . I want to be able to allow the user to change the
> value in the dropdown which would, in turn, change the values in the
> list.
>
> So, I create a background routine to change the sql accordingly. Create
> routine to respond to the event of the dropdown changing values. Set
> autopostback to true. When can I change my sql statement? It seems to
> be either before the onselectedindexchanged event fires or, if on the
> databinding event of the list, it doesn't fire at all after the first
> retrieval.
>
> I'm sure this is a common thing. Please, how is it done?
>
> tia,
> rts



Never mind. I just worked it out. You need to actually call the binding
method manually from the onselectedindexchanged event handler by
specifying:

textboxname.DataBind (); (in C#)

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Correct events order for databinding craigkenisston@hotmail.com Microsoft ASP .NET 0 25th Jun 2006 06:49 AM
Order of events, databinding, and UserControls Nathan Sokalski Microsoft ASP .NET 9 23rd May 2006 05:32 PM
Order of events, databinding, and UserControls Nathan Sokalski Microsoft VB .NET 9 23rd May 2006 05:32 PM
Order of events, databinding, and UserControls Nathan Sokalski Microsoft ADO .NET 9 23rd May 2006 05:32 PM
DataBinding and associated events Steve McLellan Microsoft Dot NET 0 23rd Sep 2004 12:09 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:05 PM.