Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Databinding and order of events

Reply
Thread Tools

Databinding and order of events

 
 
Rex the Strange
Guest
Posts: n/a
 
      11-17-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
 
      11-17-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

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 ASP .Net 0 06-25-2006 05:49 AM
Order of events, databinding, and UserControls Nathan Sokalski ASP .Net Datagrid Control 8 05-23-2006 04:32 PM
Order of events, databinding, and UserControls Nathan Sokalski ASP .Net 9 05-23-2006 04:32 PM
Order of events, databinding, and UserControls Nathan Sokalski ASP .Net Web Controls 8 05-23-2006 04:32 PM
order of events - dynamic checkbox events =?Utf-8?B?bG91aXNlIHJhaXNiZWNr?= ASP .Net 0 08-17-2005 10:36 PM



Advertisments