Re: FormView DropdownList - On Selection Change populate Text Box
am 29.03.2008 12:44:00 von Stan
On 28 Mar, 20:50, "Just Me" wrote:
> The selectIndexChanged event absolutely should fire. However, if you are
> expecting it to cause a postback when you change the selection, you need to
> set the AutoPostback property= true in the properties for this control.
>
> Once you have got the event fireing its jsut a matter of writing your code
> based on the selected index data.
>
> HTH
>
> "Satish" wrote in message
>
> news:1E9BB37C-353F-4EC9-B51D-BE3C978D0F2A@microsoft.com...
>
>
>
> > C#, ASP.NET
> > Q: Have a formview, with a dropdownlist which is bound to a column. This
> > dropdownlist has a datasource of DataSet type. Now my objective is, on
> > Selection Changed of this DropdownList, I need to populate a couple of
> > TextBox's. How can I do this? What event does the code go into? The
> > selectionindexchanged even for the DropDownList does not seem to fire.
>
> > Any help is appreciated.
>
> > Thanks in advance.- Hide quoted text -
>
> - Show quoted text -
Unfortunately, even when AutoPostback is enabled on a drop-downlist it
won't trigger a postback unless the selected value is *different* from
the previous one (or unless the SelectedIndex property actually
changes). Merely clicking on it will not do the trick.
This exposes a fundamental problem with Satish's design. Since the DDL
is preloaded with data it will not necessarily work in the intended
fashion. The best approach is to preload the other controls with
relevent data (based on the initial selection) during the FormView
DataBound event.
Re: FormView DropdownList - On Selection Change populate Text Box
am 29.03.2008 16:00:11 von unknown
With respect, I think you have missed the point. See my comments in
stars.***
>> The selectIndexChanged event absolutely should fire. However, if you are
>> expecting it to cause a postback when you **** change the selection ****
>> , you need to
"Stan" wrote in message
news:1a34b12a-ae2c-42f1-93bb-8165d95a1884@d4g2000prg.googleg roups.com...
> On 28 Mar, 20:50, "Just Me" wrote:
>> The selectIndexChanged event absolutely should fire. However, if you are
>> expecting it to cause a postback when you change the selection, you need
>> to
>> set the AutoPostback property= true in the properties for this control.
>>
>> Once you have got the event fireing its jsut a matter of writing your
>> code
>> based on the selected index data.
>>
>> HTH
>>
>> "Satish" wrote in message
>>
>> news:1E9BB37C-353F-4EC9-B51D-BE3C978D0F2A@microsoft.com...
>>
>>
>>
>> > C#, ASP.NET
>> > Q: Have a formview, with a dropdownlist which is bound to a column.
>> > This
>> > dropdownlist has a datasource of DataSet type. Now my objective is, on
>> > Selection Changed of this DropdownList, I need to populate a couple of
>> > TextBox's. How can I do this? What event does the code go into? The
>> > selectionindexchanged even for the DropDownList does not seem to fire.
>>
>> > Any help is appreciated.
>>
>> > Thanks in advance.- Hide quoted text -
>>
>> - Show quoted text -
>
> Unfortunately, even when AutoPostback is enabled on a drop-downlist it
> won't trigger a postback unless the selected value is *different* from
> the previous one (or unless the SelectedIndex property actually
> changes). Merely clicking on it will not do the trick.
>
> This exposes a fundamental problem with Satish's design. Since the DDL
> is preloaded with data it will not necessarily work in the intended
> fashion. The best approach is to preload the other controls with
> relevent data (based on the initial selection) during the FormView
> DataBound event.