blanking a listbox

Discussion in 'ASP .Net' started by UpRider, Oct 30, 2009.

  1. UpRider

    UpRider Guest

    I have a gridview that supplies a parameter to a query that populates a
    listbox via a sqlDataSource. Works fine. When I change the page of the
    gridview (and I deselect the gridview row via code in the pagechange event),
    the existing rows in the listbox remain there, even though no row in the
    gridview is selected. How do I fix this? Listbox.databind after deselecting
    the gridview row does not work.
    TIA,
    UpRider
    UpRider, Oct 30, 2009
    #1
    1. Advertising

  2. On Oct 30, 5:30 am, "UpRider" <> wrote:
    > I have a gridview that supplies a parameter to a query that populates a
    > listbox via a sqlDataSource.  Works fine.  When I change the page of the
    > gridview (and I deselect the gridview row via code in the pagechange event),
    > the existing rows in the listbox remain there, even though no row in the
    > gridview is selected.  How do I fix this? Listbox.databind after deselecting
    > the gridview row does not work.
    > TIA,
    > UpRider


    Add ListBox1.Items.Clear() to PageIndexChanging event. This would
    remove all items from the listbox.
    Alexey Smirnov, Nov 1, 2009
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?VG9iZQ==?=

    Blanking on Redirect

    =?Utf-8?B?VG9iZQ==?=, Feb 19, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    320
    Brian K. Williams
    Feb 20, 2004
  2. TylerB
    Replies:
    3
    Views:
    1,558
    TylerB
    Aug 26, 2004
  3. Chris Murphy

    blanking a java.util.Date in 1.5

    Chris Murphy, Sep 18, 2004, in forum: Java
    Replies:
    10
    Views:
    803
    Chris Murphy
    Oct 18, 2004
  4. johnny
    Replies:
    3
    Views:
    2,974
    Tomás Ó hÉilidhe
    Jan 9, 2009
  5. Adam
    Replies:
    0
    Views:
    101
Loading...

Share This Page