4 Replies Latest reply on Oct 8, 2009 7:30 PM by cescamilla

    RTtrend and its ClientID

    Jay5962

      Hi Guys

       

      I'm doing some code in DotNet that works with the ClientID of webparts i wish to manipulate. On my custom webparts I've overwritten the ClientID wrapper and exposed this to my application for usage. However RTtrend leaves me in a bind, has someone been able to extract the ClientID  of RTtrend on webparts page using Javascript for example?

        • Re: RTtrend and its ClientID
          cescamilla

          Are you doing this on the client side or on the server side?

           

          Is this going to be coded in the webpage or on a code behind?

           

          This sounds interesting

            • Re: RTtrend and its ClientID
              Jay5962

              A mixture of both. On the client side I use the client ID to force the components to interact with an  server side updatepanel using Javascript. It's working great with all the webparts surrounding the RTtrend, If i can just include RTtrend I will have an AJAX trending tool thats guarantee a seamless user experience.

                • Re: RTtrend and its ClientID
                  pkaiser

                  Since multiple instances of the same web part could appear on the same web part page, a portion of the unique identifier for each is generated by SharePoint, so there's no easy way to predict what the unique ID for any web part will be. If you could make assumptions about the structure of your web part page (for example, if you knew that there would be only one RtTrend instance), you might be able to use client-side script to loop through all elements on the page and find what you're looking for, but I have no experience with this. Here's a related post, but I'm not sure it will help: http://therightstuff.de/CommentView,guid,78dde6ae-213c-4f8c-8f9c-3e82bd67807e.aspx

                   

                   

                  • Re: RTtrend and its ClientID
                    cescamilla

                    There is a new feature of ASP.NET included with .NET 4.0 that allows the objects to use the ID property as the UniqueID in the webpage when loaded, I don't know if this will get implemmented in Sharepoint just yet, but having the UniqueID to be the ID and appending the string that Sharepoint appends you should be able to get the object you are looking for instead of hitting an closed street.