Monday, July 9, 2012

Sharepoint model dialog from ribbon button



Here i am going to explain how to open model dialog box from ribbon button control.

1. Create empty sharepoint project either with sandbox or farm solution.

2. Add feature for the solution and add Empty element file for that as show below :















3. Now your solution will looks something like this.

















4. Add this below given peace of code in Elements.xml file :





  
    
      
        
          
Here you can modify your code and test the application according

As per the testing purpose i am taking Task list template so, this peace of code will work only with Task list template. If you need this for the other templates you need to change the template number

5. Final verification is to check wether the Element file is attached to feature and the feature is added to the solution.

do this verification as below :

a. Double click on .Feature file name and check the referenced ELements file is listed there or not :

















b. Double click on Package and check our package is listed under the packages section.

6. Finally deploy the solution and create a list with Tasks template and click on Items tab, There you will find the new button "Open model popup"

















7. Click on that button you will get Settings.aspx model popup page.

















Here for demo purpose i am using default settings page. In real time you can change this on fly.

Thank you !!!



No comments:

Post a Comment

Post a Comment