Home All Groups Group Topic Archive Search About
Author
25 May 2005 1:51 AM
latha
Hi

I have two listboxes in the datagrid. Based on the value selected in the
first listbox, I need to filter the second listbox.

I have used onselectedindexchanged for the firtst and able to retrieve the
value of the first list box.

For Second listbox, I have HTML page with datasource="<%# getds() %>"

When the page gets loaded for the first time, everything is fine but when I
select the value in the first listbox, that time, it is not going inside the
getds() function and hence not updating its list.

I am kind of struck with this problem, any help is greatly appreciated.
I guess its pretty common to use this kind of functionality in a grid and I
didnot find any samples.
--
Soly

Author
25 May 2005 5:54 PM
Brock Allen
In the change event of the first, you should re-DataBind the second.

-Brock
DevelopMentor
http://staff.develop.com/ballen



Show quoteHide quote
> Hi
>
> I have two listboxes in the datagrid. Based on the value selected in
> the first listbox, I need to filter the second listbox.
>
> I have used onselectedindexchanged for the firtst and able to retrieve
> the value of the first list box.
>
> For Second listbox, I have HTML page with datasource="<%# getds() %>"
>
> When the page gets loaded for the first time, everything is fine but
> when I select the value in the first listbox, that time, it is not
> going inside the getds() function and hence not updating its list.
>
> I am kind of struck with this problem, any help is greatly
> appreciated.
> I guess its pretty common to use this kind of functionality in a grid
> and I
> didnot find any samples.
Author
26 May 2005 2:08 AM
latha
During the rebind of second listbox, it is performing what it is supposed to
do but also  it is going back to the HTML page and firing the original
datasource which is setting back to the original state.
--
Soly


Show quoteHide quote
"Brock Allen" wrote:

> In the change event of the first, you should re-DataBind the second.
>
> -Brock
> DevelopMentor
> http://staff.develop.com/ballen
>
>
>
> > Hi
> >
> > I have two listboxes in the datagrid. Based on the value selected in
> > the first listbox, I need to filter the second listbox.
> >
> > I have used onselectedindexchanged for the firtst and able to retrieve
> > the value of the first list box.
> >
> > For Second listbox, I have HTML page with datasource="<%# getds() %>"
> >
> > When the page gets loaded for the first time, everything is fine but
> > when I select the value in the first listbox, that time, it is not
> > going inside the getds() function and hence not updating its list.
> >
> > I am kind of struck with this problem, any help is greatly
> > appreciated.
> > I guess its pretty common to use this kind of functionality in a grid
> > and I
> > didnot find any samples.
>
>
>
>