in

CodeSmith Community

Your Code. Your Way. Faster!

GridViewSearchPanel Filter delay?

Last post 04-06-2007 9:13 AM by mike123. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 04-03-2007 1:22 PM

    • david849
    • Top 500 Contributor
    • Joined on 03-13-2007
    • Posts 12
    • Points 275

    GridViewSearchPanel Filter delay?

    This is something stupid on my side, but I can't figure it out.... 

    I have given the user a checkbox - that when they check it, it will filter results in the entitygridview.  It is set by default to be unchecked.

    onCheckChanged event I run the code below.  My problem is that it always seems to be one click behind.  Thus, the first time I click the checkbox (cbToggleMappedDrugs.Checked = True)...the gridview data does not change (but in debug mode it does run the .Checked = true code).  Then the next click is me unchecking the checkbox (cbToggleMappedDrugs.Checked = false)...and in debug mode it runs the else code.  After the "else" logic runs, the gridview updates with the results from the first click...

             if ( cbToggleMappedDrugs.Checked )
            {
                gvspSiteDrugs.Filter = "drugid is null";
                gvspSiteDrugs.DataBind ();
                gvSiteDrugs.DataBind ();
            }
            else
            {

                gvspSiteDrugs.Filter = "drugname like '%'";
                gvspSiteDrugs.DataBind ();
                gvSiteDrugs.DataBind ();
            }

     
    I hope I'm not confusing everyone too much... :)  Basically it I'm doing something wrong and the gridview update is always one click behind.  I've experienced this same issue in another page that i'm filtering by certain keywords.   It doesn't do anything with the first keyword I filter by. But the second time a pass a keyword to filter with...it will then update the gridview and display the results from the 1st keyword filter.  I know that the filter is working because if I click on a gridview page number - it will then show the correctly filtered gridview data...
     

    ALSO, one more related question... 

     I'm using the gridviewsearchpanel as well with the entitygridview I spoke about before.  What is the best way to handle filtering based on the checkbox above and the filter parameters the user provided in the search panel??

     

     Thanks!!!

    David 

    • Post Points: 35
  • 04-05-2007 7:46 AM In reply to

    • mike123
    • Top 10 Contributor
    • Joined on 02-25-2005
    • Toronto, Ontario
    • Posts 723
    • Points 16,775

    Re: GridViewSearchPanel Filter delay?

    David,

    Let me get back to you on that.

     

    Mike Shatny
    -------------------------------------
    Member of the .netTiers team
    http://www.nettiers.com
    -------------------------------------
    • Post Points: 5
  • 04-05-2007 3:32 PM In reply to

    • mike123
    • Top 10 Contributor
    • Joined on 02-25-2005
    • Toronto, Ontario
    • Posts 723
    • Points 16,775

    Re: GridViewSearchPanel Filter delay?

    David,

    The fix has been made (rev. 536) Your code should work fine.  Let us know of any issue.

     

    Mike Shatny
    -------------------------------------
    Member of the .netTiers team
    http://www.nettiers.com
    -------------------------------------
    • Post Points: 35
  • 04-06-2007 8:44 AM In reply to

    • david849
    • Top 500 Contributor
    • Joined on 03-13-2007
    • Posts 12
    • Points 275

    Re: GridViewSearchPanel Filter delay?

    Hey Mike,

     I just checked this morning to see if a nightly build was release and didn't see anything.  Are you guy going to release another build soon?  If not how do I get the changes that you made?  I downloaded TortiseSVN and attempted to connect to https://svn.sourceforge.net/svnroot/nettiers/netTiers2...but it said that it didn't exist.


    Thanks,

    David
     

    Filed under: ,
    • Post Points: 35
  • 04-06-2007 9:13 AM In reply to

    • mike123
    • Top 10 Contributor
    • Joined on 02-25-2005
    • Toronto, Ontario
    • Posts 723
    • Points 16,775

    Re: GridViewSearchPanel Filter delay?

    David,

    I could see nightly builds didn't run since March 28. Normally there is a new build every day or so ...

    When using TortoiseSVN use the following url to connect to svn: https://svn.sourceforge.net/svnroot/nettiers/source/trunk/Source The file that was modified to fix the above issue is here https://svn.sourceforge.net/svnroot/nettiers/source/trunk/Source/WebLibrary/UI/GridViewSearchPanel.cs.cst 

    Mike Shatny
    -------------------------------------
    Member of the .netTiers team
    http://www.nettiers.com
    -------------------------------------
    • Post Points: 5
Page 1 of 1 (5 items)
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems