Showing posts with label SharePoint 2010. Show all posts
Showing posts with label SharePoint 2010. Show all posts

Wednesday, April 11, 2012

Create custom content type and list instance in SharePoint 2010 using Visual Studio 2010

Create custom content type and list instance in SharePoint 2010 using Visual Studio 2010

I successfully created a list definition by following above mentioned article, when i deployed the solution got following error "Error occurred in deployment step 'Activate Features': Value does not fall within the expected range."  as i was using simply a guid as Contype Type ID not following convention for Content Type ID. Thanks to following article that helps me to understand Content Type ID conventions.
Content Type IDs.

Wednesday, March 21, 2012

Close SharePoint 2010 Dialog through code

Close SharePoint 2010 Dialog through code

Show Wait Screen on sharepoint dialog

To show wait screen, we need to pass null instead of width and height (or not to initialize this parameters, if  using dialog options object): 



function OpenDialog(strPageURL) {
        try {

            var options = {
            url: strPageURL,  // ID of the HTML tag
    // or HTML content to be displayed in modal dialog
               width: null,
                height: null,
                title: "Dialog Title",
                allowMaximize: true,
                showClose: true
            };

            SP.UI.ModalDialog.showModalDialog(options);

            return false;
        }
        catch (err) {
            alert(err.Description);
        }
    }