SubSonic Forums
All Your Database Are Belong To Us

Scaffold - can you hide the Add button?

Latest post 06-25-2008 6:06 PM by yitzchok. 5 replies.
  • 06-25-2008 4:52 PM

    Scaffold - can you hide the Add button?

    I'm putting together a scaffold for a client.  They should be able to edit data but not add new rows.  Any way to hide the Add option?

     

    TIA, HE

     

    Filed under:
  • 06-25-2008 5:32 PM In reply to

    Re: Scaffold - can you hide the Add button?

    I think you will have to edit the code for that.

     

    Also Note
    The term "scaffolding" is from Ruby On Rails, and is essentially a full set of "CRUD" pages for you to enter and manipulate data in your database. Initially, scaffolding was not meant for public use, rather your use as a develeloper to enter and use data quickly. We are moving in the direction however of outputting the scaffolds to an actual page so that you can create and customize editors as needed.

    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

  • 06-25-2008 5:32 PM In reply to

    Re: Scaffold - can you hide the Add button?

    Interesting.  Setting the readonlycolumns value seems to hide that value.  Is that expected behavior?  It doesn't seem obvious to me but perhaps I'm missing something.

    Filed under:
  • 06-25-2008 5:42 PM In reply to

    Re: Scaffold - can you hide the Add button?

    Oh - yup it looks like that if you set ReadOnlyColumns to set to something then the Add Button is Disabled

    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

  • 06-25-2008 5:51 PM In reply to

    Re: Scaffold - can you hide the Add button?

    I know it's really an admin tool but are there any thoughts about turning it into a general website edit tool?  I also noticed that the whereexpression is not being honored when new records are added.  I may change the code to do this, but is that a logical thing to add to the code base?

    Thanks for your quick response, btw. Drinks

  • 06-25-2008 6:06 PM In reply to

    Re: Scaffold - can you hide the Add button?

    HelluvaEngineer:
    I know it's really an admin tool but are there any thoughts about turning it into a general website edit tool?

    I think what should be done is creating a Provider for ASP.NET Dynamic Data.

    If you get something then you can post a patch on codeplex.

    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

Page 1 of 1 (6 items) | RSS