Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. SharePoint
  4. Connections greyed out when trying to connect two webparts for passing valuesparameter

Connections greyed out when trying to connect two webparts for passing valuesparameter

Scheduled Pinned Locked Moved SharePoint
tutorialsharepointhelplearning
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Rocky
    wrote on last edited by
    #1

    Hi guys, It hasn't been too long since I have started development with Sharepoint so please forgive me in case of my ignorance :) I'm trying to basically connect two webparts with the Provider and Consumer where the provider has a SPGridView of products where I wanna click on SerialNumber field (a linkbutton) and go to the products details page where the details would come based on that serial number of course. So I want to simply pass that serial number over to the other web part. The problem is that when I that when I add these two web parts on a page and click on the arrow button to get to "Connections" menu, it is greyed out with the message: "The web part you are connecting from does not allow authoring of connections" Here is my check list of possible problems:- - The site does allow connection - Browser is IE9 which should be compatible I guess :) - NOT SURE if webpart zone disallows connections coz I don't know how to check that yet. - The webparts itself should allow the connections I think. Here's the code sections for you though: The Interface for provider/consumer

    public interface IProduct
    {
    string _ProductSelected
    {
    get;

        }
    }
    

    From Provider Web part

    protected void lnkSerial_OnClick(object sender, EventArgs e)
    {
    if (sender != null)
    {
    _SelectedSerialNumber = ((LinkButton)sender).CommandArgument;

            }
            else
            {
            
            }
        }
        \[ConnectionProvider("Product Serial Number passing provider")\]
        public IProduct ProviderMethod()
        {
            return this;
        }
        public void ProvideSerialNumber()
        { 
        
        }
        string IProduct.\_ProductSelected
        {
            get
            {
                return \_SelectedSerialNumber;
            }
            
        }
    

    From Consumer Web Part

    [ConnectionConsumer("Product As Realized Consumer")]
    public void LoadProductAsRealizedDetails(IProduct providerInterface)
    {
    _Product = providerInterface;
    ProductAsRealized product = RealizedProductMethods.GetProductAsRealized(_Product._ProductSelected);
    //product

        }
    

    Please tell me if you see something wrong or have any ideas for this. The trouble is that the basic example I followed for doing this works just fine on the same

    R 1 Reply Last reply
    0
    • R Rocky

      Hi guys, It hasn't been too long since I have started development with Sharepoint so please forgive me in case of my ignorance :) I'm trying to basically connect two webparts with the Provider and Consumer where the provider has a SPGridView of products where I wanna click on SerialNumber field (a linkbutton) and go to the products details page where the details would come based on that serial number of course. So I want to simply pass that serial number over to the other web part. The problem is that when I that when I add these two web parts on a page and click on the arrow button to get to "Connections" menu, it is greyed out with the message: "The web part you are connecting from does not allow authoring of connections" Here is my check list of possible problems:- - The site does allow connection - Browser is IE9 which should be compatible I guess :) - NOT SURE if webpart zone disallows connections coz I don't know how to check that yet. - The webparts itself should allow the connections I think. Here's the code sections for you though: The Interface for provider/consumer

      public interface IProduct
      {
      string _ProductSelected
      {
      get;

          }
      }
      

      From Provider Web part

      protected void lnkSerial_OnClick(object sender, EventArgs e)
      {
      if (sender != null)
      {
      _SelectedSerialNumber = ((LinkButton)sender).CommandArgument;

              }
              else
              {
              
              }
          }
          \[ConnectionProvider("Product Serial Number passing provider")\]
          public IProduct ProviderMethod()
          {
              return this;
          }
          public void ProvideSerialNumber()
          { 
          
          }
          string IProduct.\_ProductSelected
          {
              get
              {
                  return \_SelectedSerialNumber;
              }
              
          }
      

      From Consumer Web Part

      [ConnectionConsumer("Product As Realized Consumer")]
      public void LoadProductAsRealizedDetails(IProduct providerInterface)
      {
      _Product = providerInterface;
      ProductAsRealized product = RealizedProductMethods.GetProductAsRealized(_Product._ProductSelected);
      //product

          }
      

      Please tell me if you see something wrong or have any ideas for this. The trouble is that the basic example I followed for doing this works just fine on the same

      R Offline
      R Offline
      Rocky
      wrote on last edited by
      #2

      Okay, got it sorted out thanks to Patrick Lamber's post right here[^]

      Rocky My Blog

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups