SubSonic Forums
All Your Database Are Belong To Us

WhereExpression for Scaffold

Latest post 12-31-2007 4:27 PM by awang. 9 replies.
  • 12-28-2007 3:06 PM

    • awang
    • Top 100 Contributor
    • Joined on 12-27-2007
    • Posts 20

    WhereExpression for Scaffold

     Hi there,

     

    I am just wondering if it's possible to add  WhereExpression for scaffold so that I can filter some data out.

    Please let me know

    Thanks

    Alan 

    Filed under:
  • 12-29-2007 12:25 AM In reply to

    • ranomore
    • Top 10 Contributor
    • Joined on 11-05-2007
    • Salt Lake City
    • Posts 322

    Re: WhereExpression for Scaffold

    Reply |Contact |Answer

     Yes. The property is called WhereExpression. ;)

     http://subsonichelp.com/html/ab350a6d-0ef5-47da-5c06-808e669f2d87.htm 

  • 12-29-2007 9:26 AM In reply to

    • awang
    • Top 100 Contributor
    • Joined on 12-27-2007
    • Posts 20

    Re: WhereExpression for Scaffold

     I am using SubSonic 2.0.3 version and <subsonic:Scaffold> doesn't have WhereExpression property. At lease I can't see from VS 2005. By the way, I am talking about <subsonic:Scaffold> not <subsonic:QuickTable>.

     

    Please let me know if  did anything wrong.

    Thanks in advance

    Alan 

  • 12-29-2007 11:55 PM In reply to

    Re: WhereExpression for Scaffold

    It should be there

    <subsonic:Scaffold ID="" runat="server" WhereExpression="" />

    If I am I because I am I, and You are You because You are You, then I am I, and you are you. But If I am I because You are You, and You are You because I am I, then I am not I and You are not You. -Rabbi of Kotzk

  • 12-30-2007 10:29 AM In reply to

    • awang
    • Top 100 Contributor
    • Joined on 12-27-2007
    • Posts 20

    Re: WhereExpression for Scaffold

     No, Visual Studio 2005 gave me error message as follow:

     

    Error    2    Type 'SubSonic.Scaffold' does not have a public property named 'WhereExpression'.    E:\backup\web\Mahayana\Mahayana.Web\Default.aspx    24   

     

    By the way, I am using SubSonic 2.0.3 and also wondering it it works for you.

     
    Alan
     

  • 12-31-2007 1:38 PM In reply to

    • awang
    • Top 100 Contributor
    • Joined on 12-27-2007
    • Posts 20

    Re: WhereExpression for Scaffold

     I checked out API Doc online and WhereExpression property is only available for <subsonic: QuickTable> control, but not for <subsonic: Scaffold> control. The point is  <subsonic:QuickTable> control can't edit record like <subsonic:Scaffold>. I guess I have to write my own edit record for <subsonic:QuickTable> control using detailsview or formview.

    Alan 

    Filed under:
  • 12-31-2007 2:58 PM In reply to

    Re: WhereExpression for Scaffold

    Reply |Contact |Answer

     This works for me

        <subsonic:Scaffold ID="tryout" runat="server" WhereExpression="LogUserID=1"
                ReturnOnSave="True" TableName="EventLog" ></subsonic:Scaffold>

    If I am I because I am I, and You are You because You are You, then I am I, and you are you. But If I am I because You are You, and You are You because I am I, then I am not I and You are not You. -Rabbi of Kotzk

  • 12-31-2007 3:11 PM In reply to

    • awang
    • Top 100 Contributor
    • Joined on 12-27-2007
    • Posts 20

    Re: WhereExpression for Scaffold

     What version of SubSonic do you use and wondering if you could post your source code for me.

     Thanks  in advance

    Alan 

  • 12-31-2007 3:34 PM In reply to

    Re: WhereExpression for Scaffold

     I used the latest stuff downloaded from GoogleCode (SNV server)

    If I am I because I am I, and You are You because You are You, then I am I, and you are you. But If I am I because You are You, and You are You because I am I, then I am not I and You are not You. -Rabbi of Kotzk

  • 12-31-2007 4:27 PM In reply to

    • awang
    • Top 100 Contributor
    • Joined on 12-27-2007
    • Posts 20

    Re: WhereExpression for Scaffold

     Thanks, it works now. I didn't use the latest version before.

     

    By the way is there any way we can do the paging on the <subsonic:Scaffold> control?

    Thanks again. It helps a lot.

    Alan 

Page 1 of 1 (10 items) | RSS